r8902 - /scripts/qa/qareport

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Tue Nov 6 09:46:56 UTC 2007


Author: tincho-guest
Date: Tue Nov  6 09:46:55 2007
New Revision: 8902

URL: http://svn.debian.org/wsvn/?sc=1&rev=8902
Log:
Bare-bones reporting

Added:
    scripts/qa/qareport   (with props)

Added: scripts/qa/qareport
URL: http://svn.debian.org/wsvn/scripts/qa/qareport?rev=8902&op=file
==============================================================================
--- scripts/qa/qareport (added)
+++ scripts/qa/qareport Tue Nov  6 09:46:55 2007
@@ -1,0 +1,80 @@
+#!/usr/bin/perl
+# vim:ts=4:sw=4:et:ai:sts=4
+# $Id$
+#
+# Draft of a report
+#
+# Copyright Martín Ferrari <martin.ferrari at gmail.com>, 2007
+# Released under the terms of the GNU GPL 2
+use strict;
+use warnings;
+
+use DebianQA::Cache;
+use DebianQA::Common;
+use DebianQA::Config;
+use DebianQA::Svn;
+use Getopt::Long;
+
+my $opts = getopt_common(1);
+
+my $p = new Getopt::Long::Parser;
+$p->configure(qw(no_ignore_case bundling));
+
+my $list_is_packages = 0;
+$p->getoptions('help|h|?' => \&help, 'packages!' => \$list_is_packages,
+    ) or die "Error parsing command-line arguments!\n";
+
+my @dirs = @ARGV;
+
+if($list_is_packages) {
+    foreach my $dir (@dirs) {
+        $dir = svndir2pkgname($dir) || $dir; # Fallback
+    }
+}
+
+my $data = read_cache(consolidated => "");
+my @pkglist = get_pkglist();
+foreach my $pkg (@pkglist) {
+    next if($pkg =~ /^\//);
+    my $svnpath = $data->{svn}{$pkg}{dir};
+    print "$pkg: (SVN: $svnpath)\n";
+    print " - Version status:\n";
+    my $werr = $data->{watch}{$pkg}{error} || "OK";
+    print "   + Watch status: $werr\n";
+
+    my $dver = $data->{svn}{$pkg}{version} || "none";
+    print "   + SVN: $dver ";
+
+    my $undver = $data->{svn}{$pkg}{un_version};
+    print "(unreleased: $undver) " if($undver);
+
+    my $archver = $data->{archive}{$pkg}{most_recent} || "Not uploaded";
+    print "Archive: $archver ";
+
+    my $uver = $data->{watch}{$pkg}{upstream_ver};
+    print "Upstream: $uver\n";
+
+    my @bugs = @{$data->{bts}{$pkg}};
+    @bugs = map({ "#$_" } @bugs);
+    print "   + Bugs: ", join(", ", @bugs), "\n" if(@bugs);
+}
+#use Data::Dumper; print Dumper $data;
+
+sub help {
+    print <<END;
+Usage:
+ $0 [options] [dirname [dirname ...]]
+
+ For each named directory, updates the databases with information retrieved
+ from the Debian archive, BTS, watchfiles and the Subversion repository.
+
+Options:
+ --help, -h         This help.
+ --conf, -c FILE    Specifies a configuration file, uses defaults if not
+                    present.
+ --packages         Treat the parameters as source package names, instead of
+                    directories.
+
+END
+    exit 0;
+}

Propchange: scripts/qa/qareport
------------------------------------------------------------------------------
    svn:executable = *

Propchange: scripts/qa/qareport
------------------------------------------------------------------------------
    svn:keywords = Id




More information about the Pkg-perl-cvs-commits mailing list