actually fix caching for release/stable
authorespie <espie@openbsd.org>
Wed, 17 May 2023 15:45:36 +0000 (15:45 +0000)
committerespie <espie@openbsd.org>
Wed, 17 May 2023 15:45:36 +0000 (15:45 +0000)
$r2 computation was wrong, led to an undef, which autovivification promptly
masked

usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm

index ee7dd00..09af353 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: Installed.pm,v 1.44 2022/05/08 13:21:04 espie Exp $
+# $OpenBSD: Installed.pm,v 1.45 2023/05/17 15:45:36 espie Exp $
 #
 # Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
 #
@@ -75,7 +75,7 @@ sub setup_cache
        # with the corresponding release
        if (defined $repo->{release}) {
                my $url = $repo->urlscheme."://$repo->{host}$repo->{release}";
-               my $r2 = $repo->parse_url(\$url, $state);
+               my $r2 = OpenBSD::PackageRepository->parse(\$url, $state);
                $r2->{info_cache} = $repo->{info_cache};
        }
 }