r8855 - in /scripts/qa/QA: DebBugs.pm DebianArchive.pm Svn.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Sun Nov 4 19:03:43 UTC 2007
Author: tincho-guest
Date: Sun Nov 4 19:03:43 2007
New Revision: 8855
URL: http://svn.debian.org/wsvn/?sc=1&rev=8855
Log:
More helper routines: get_pkglist*
Modified:
scripts/qa/QA/DebBugs.pm
scripts/qa/QA/DebianArchive.pm
scripts/qa/QA/Svn.pm
Modified: scripts/qa/QA/DebBugs.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/DebBugs.pm?rev=8855&op=diff
==============================================================================
--- scripts/qa/QA/DebBugs.pm (original)
+++ scripts/qa/QA/DebBugs.pm Sun Nov 4 19:03:43 2007
@@ -17,6 +17,7 @@
use QA::Common;
use QA::Cache;
+use QA::Svn;
use SOAP::Lite;
my $ttl = 360; # 6 hours
@@ -51,7 +52,7 @@
# No list of packages; forced operation or stale cache
info("BTS info is stale") unless($force);
$replace = 1;
- @pkglist = keys(%{ read_cache("consolidated", "pkglist", 0) });
+ @pkglist = get_pkglist();
# TODO: could verificate that pkglist and maint = $maint are the same
# packages
if(@pkglist) {
@@ -80,7 +81,7 @@
$cdata = update_cache("bts", \%bugs, "", $replace, 1);
info("Re-generating consolidated hash");
- @pkglist = keys(%{ read_cache("consolidated", "pkglist", 0) });
+ @pkglist = get_pkglist();
@pkglist = keys(%bugs) unless(@pkglist);
# TODO: Interesting fields:
Modified: scripts/qa/QA/DebianArchive.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/DebianArchive.pm?rev=8855&op=diff
==============================================================================
--- scripts/qa/QA/DebianArchive.pm (original)
+++ scripts/qa/QA/DebianArchive.pm Sun Nov 4 19:03:43 2007
@@ -19,6 +19,7 @@
use QA::Cache;
use QA::Common;
use QA::Config '$MIRROR';
+use QA::Svn;
use QA::VerComp;
use LWP::UserAgent;
#use IO::Uncompress::Gunzip; # Only in lenny
@@ -83,7 +84,7 @@
}
return $data->{global} unless($modified);
info("Re-generating consolidated hash");
- my $pkgs = read_cache("consolidated", "pkglist", 0);
+ my $pkgs = get_pkglist_hashref();
# retain lock, we need consistency
$data = read_cache("archive", "", 1);
my $g = {};
Modified: scripts/qa/QA/Svn.pm
URL: http://svn.debian.org/wsvn/scripts/qa/QA/Svn.pm?rev=8855&op=diff
==============================================================================
--- scripts/qa/QA/Svn.pm (original)
+++ scripts/qa/QA/Svn.pm Sun Nov 4 19:03:43 2007
@@ -16,7 +16,8 @@
our @ISA = "Exporter";
our @EXPORT = (qw(
- svn_download svn_get svn_get_consolidated svndir2pkgname pkgname2svndir
+ svn_download svn_get svn_get_consolidated
+ svndir2pkgname pkgname2svndir get_pkglist get_pkglist_hashref
));
use IO::Scalar;
@@ -186,6 +187,13 @@
$data->{$_}{pkgname} eq $pkg } keys %$data);
return $dirs[0] if(@dirs);
return undef;
+}
+# Returns the list of source packages detected in the svn repository
+sub get_pkglist {
+ return keys(%{ read_cache("consolidated", "pkglist", 0) });
+}
+sub get_pkglist_hashref {
+ return read_cache("consolidated", "pkglist", 0);
}
# Parses watchfile, returns an arrayref containing one element for each source,
# consisting of the URL spec, an MD5 sum of the line (to detect changes from
More information about the Pkg-perl-cvs-commits
mailing list