r42032 - /scripts/qa/packagecheck.pl

jeremiah-guest at users.alioth.debian.org jeremiah-guest at users.alioth.debian.org
Mon Aug 17 19:07:02 UTC 2009


Author: jeremiah-guest
Date: Mon Aug 17 19:06:56 2009
New Revision: 42032

URL: http://svn.debian.org/wsvn/?sc=1&rev=42032
Log:
Added three options, including --automatic. The script is not very useful yet, but hey - release early, release often. :)

Added:
    scripts/qa/packagecheck.pl   (with props)

Added: scripts/qa/packagecheck.pl
URL: http://svn.debian.org/wsvn/scripts/qa/packagecheck.pl?rev=42032&op=file
==============================================================================
--- scripts/qa/packagecheck.pl (added)
+++ scripts/qa/packagecheck.pl Mon Aug 17 19:06:56 2009
@@ -1,0 +1,93 @@
+#!/usr/bin/perl
+
+# Perlification Copyright 2009, Jeremiah C. Foster <jeremiah at jeremiahfoster.com>
+# Copyright 2007, 2008, 2009 gregor herrmann <gregoa at debian.org>
+# Copyright 2007, 2008 Damyan Ivanov <dmn at debian.org>
+# Copyright 2007 David Paleino <d.paleino at gmail.com>
+# Released under the terms of the GNU GPL version 2
+#
+# To be run one directory above trunk/
+# (package name can be specified as the first argument)
+
+=head1 NAME
+
+packagecheck.pl
+
+=head1 VERSION
+
+This document describes packagecheck.pl version 0.1
+
+=head1 DESCRIPTION
+
+This tool is used inside the debian perl group for checking packages
+maintained by that group. As a consequence, it is very debian perl centric,
+and certain assumptions are made, like that you have the debian-perl svn repository
+checked out. The script might not be of much use outside the debian
+perl group. But you are welcome to use whatever code you find useful here.
+
+=head1 SYNOPSIS
+
+packagecheck.pl [options]
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a brief help message, then exit.
+
+=item B<--current>
+
+Test a package that is in the current working directory
+
+=cut
+
+use warnings;
+use strict;
+use Getopt::Long;
+use Pod::Usage;
+use Cwd;
+use IPC::System::Simple qw(system capture);
+
+# Options
+my ($automatic, $vcs, $homepage, $maintainer, $depends, $watch,
+    $create, $rules, $quilt, $all, $package, $help, $current,
+   );
+
+GetOptions( 'help' => \$help,
+	    'current' => \$current,
+	    'auto' => \$automatic,
+          );
+
+# Print usage if there is no option or if the option is help
+pod2usage(1) if $help;
+pod2usage(1) if not $ARGV[0];
+
+# Process options
+
+sub sanity_check {
+  my $dir = shift;
+  if (not -d $dir) {
+    die "Cannot find working directory $dir: $!";
+  }
+
+}
+
+if ($current) {
+  my $cwd = cwd();
+  sanity_check($cwd);
+
+  if (!$automatic) {
+    print "Running svn up in $cwd\n";
+    my @svnrev = capture("svn up $cwd");
+    print $svnrev[-1];
+  }
+  else {
+    print "We're running automatically.\n";
+  }
+}
+
+
+
+1;

Propchange: scripts/qa/packagecheck.pl
------------------------------------------------------------------------------
    svn:executable = *




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