zap branch info so that pre-caching works with stuff like autoconf%2.64
authorespie <espie@openbsd.org>
Wed, 20 Apr 2022 09:19:52 +0000 (09:19 +0000)
committerespie <espie@openbsd.org>
Wed, 20 Apr 2022 09:19:52 +0000 (09:19 +0000)
usr.sbin/pkg_add/OpenBSD/PackageRepository/Cache.pm

index 2680110..1031e3c 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: Cache.pm,v 1.2 2022/04/19 12:51:32 espie Exp $
+# $OpenBSD: Cache.pm,v 1.3 2022/04/20 09:19:52 espie Exp $
 #
 # Copyright (c) 2022 Marc Espie <espie@openbsd.org>
 #
@@ -69,6 +69,7 @@ sub prime_update_info_cache
                        my $stem = OpenBSD::PackageName::splitstem($name);
                        next if $stem =~ m/^\.libs\d*\-/;
                        next if $stem =~ m/^partial\-/;
+                       $stem =~ s/\%.*//; # zap branch info
                        $self->{stems}{$stem} = 1;
                }
        }