# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocation.pm,v 1.57 2022/04/19 12:51:32 espie Exp $
+# $OpenBSD: PackageLocation.pm,v 1.58 2022/04/29 10:44:05 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
my $state = $self->{repository}{state};
my $info = $self->{repository}->get_cached_info($name);
if (defined $info &&
- !defined $state->defines("TEST_CACHING_RECHECK")) {
+ !defined $state->defines("CACHING_RECHECK")) {
return $info;
}
my $result = $self->plist(\&OpenBSD::PackingList::UpdateInfoOnly,
# ex:ts=8 sw=4:
-# $OpenBSD: Cache.pm,v 1.4 2022/04/20 09:24:07 espie Exp $
+# $OpenBSD: Cache.pm,v 1.5 2022/04/29 10:44:05 espie Exp $
#
# Copyright (c) 2022 Marc Espie <espie@openbsd.org>
#
'-d', OpenBSD::Paths->updateinfodb, '--');
my $state = $self->{state};
$state->errsay("Running #1", join(' ', @params))
- if $state->defines("TEST_CACHING_VERBOSE");
+ if $state->defines("CACHING_VERBOSE");
return @params;
}
for my $pkgname (keys %$uncached) {
delete $self->{raw_data}{$pkgname}
}
- return unless $state->defines("TEST_CACHING_VERBOSE");
+ return unless $state->defines("CACHING_VERBOSE");
for my $k (@list) {
if (!defined $found->{$k}) {
$state->say("No cache entry for #1", $k);
my $stem = OpenBSD::PackageName::splitstem($name);
if (exists $self->{stems}{$stem}) {
$state->say("Negative caching for #1", $name)
- if $state->defines("TEST_CACHING_VERBOSE");
+ if $state->defines("CACHING_VERBOSE");
return undef;
}
$content = '';
}
if ($content eq '') {
$state->say("Cache miss for #1", $name)
- if $state->defines("TEST_CACHING_VERBOSE");
+ if $state->defines("CACHING_VERBOSE");
return undef;
}
open my $fh2, "<", \$content;
# ex:ts=8 sw=4:
-# $OpenBSD: Installed.pm,v 1.42 2022/04/28 08:39:18 espie Exp $
+# $OpenBSD: Installed.pm,v 1.43 2022/04/29 10:44:05 espie Exp $
#
# Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org>
#
my ($repo, $setlist) = @_;
my $state = $repo->{state};
- return unless $state->defines("TEST_CACHING");
+ return if $state->defines("NO_CACHING");
require OpenBSD::PackageRepository::Cache;