r8817 - in /scripts/qa/QA: Cache.pm Common.pm DebianArchive.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Sun Nov 4 10:27:24 UTC 2007
Author: tincho-guest
Date: Sun Nov 4 10:27:24 2007
New Revision: 8817
URL: http://svn.debian.org/wsvn/?sc=1&rev=8817
Log:
A pair of cosmetic changes. A fix in Cache, that prevented creating files
Modified:
scripts/qa/QA/Cache.pm
scripts/qa/QA/Common.pm
scripts/qa/QA/DebianArchive.pm
Modified: scripts/qa/QA/Cache.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/Cache.pm?rev=8817&op=diff
==============================================================================
--- scripts/qa/QA/Cache.pm (original)
+++ scripts/qa/QA/Cache.pm Sun Nov 4 10:27:24 2007
@@ -125,9 +125,14 @@
if(! defined($fd{$cache})) {
debug("Opening $CACHEDIR/$cache in RW mode");
- mkpath $CACHEDIR;
- open($fd{$cache}, "+<", "$CACHEDIR/$cache")
- or die "Error opening cache: $!\n";
+ if(-e "$CACHEDIR/$cache") {
+ open($fd{$cache}, "+<", "$CACHEDIR/$cache")
+ or die "Error opening cache: $!\n";
+ } else {
+ mkpath $CACHEDIR;
+ open($fd{$cache}, "+>", "$CACHEDIR/$cache")
+ or die "Error opening cache: $!\n";
+ }
flock($fd{$cache}, LOCK_EX) or die "Error locking cache: $!\n";
}
my $fd = $fd{$cache};
Modified: scripts/qa/QA/Common.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/Common.pm?rev=8817&op=diff
==============================================================================
--- scripts/qa/QA/Common.pm (original)
+++ scripts/qa/QA/Common.pm Sun Nov 4 10:27:24 2007
@@ -21,11 +21,7 @@
sub print_msg {
my($logfmt, @msg) = @_;
- foreach(0..$#msg-1) {
- $msg[$_] .= " " unless ($msg[$_] =~ /\n$/s);
- }
- my $msg = join("", @msg);
- @msg = split(/\n+/, $msg);
+ @msg = split(/\n+/, join("", @msg));
foreach(@msg) {
if($logfmt) {
printf(STDERR "%s %s[%d]: %s\n",
Modified: scripts/qa/QA/DebianArchive.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/DebianArchive.pm?rev=8817&op=diff
==============================================================================
--- scripts/qa/QA/DebianArchive.pm (original)
+++ scripts/qa/QA/DebianArchive.pm Sun Nov 4 10:27:24 2007
@@ -65,7 +65,7 @@
my $modified;
foreach my $src (@list) {
if($force or $ttl{$src} * 60 < time - find_timestamp($data, $src)) {
- info("$src is stale, getting new version");
+ info("$src is stale, getting new version") unless($force);
my $d;
if($src eq "new") {
$d = get_new();
@@ -81,9 +81,9 @@
}
}
return $data->{global} unless($modified);
+ info("Re-generating consolidated hash");
+ my $pkgs = read_cache("consolidated", "pkglist", 0);
# retain lock, we need consistency
- info("Re-generating consolidated hash");
- my $pkgs = read_cache("consolidated", "svn", 0);
$data = read_cache("archive", "", 1);
my $g = {};
foreach my $suite (keys(%$data)) {
More information about the Pkg-perl-cvs-commits
mailing list