Author: zobel
Date: 2008-04-05 16:16:29 +0000 (Sat, 05 Apr 2008)
New Revision: 1243

Modified:
   trunk/debian/changelog
   trunk/debian/control
   trunk/scripts/debchange.1
   trunk/scripts/debchange.pl
Log:
* find our ourself, if we are NMUing a package
* short form of --qa is now -q


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-04-05 13:56:09 UTC (rev 1242)
+++ trunk/debian/changelog      2008-04-05 16:16:29 UTC (rev 1243)
@@ -55,9 +55,12 @@
 
   [ Martin Zobel-Helas ]
   * debchange
-    + set urgency=high if NMU and no other urgency set (Closes: #474391)
+    + Set urgency=high if NMU and no other urgency set (Closes: #474391)
+    + Set to NMU if packager is neither in Uploaders nor Maintainer 
+      (Closes: #474399)
+    + Add abbreviation -q for --qa (Closes: #474434)
 
- -- Martin Zobel-Helas <[EMAIL PROTECTED]>  Sat, 05 Apr 2008 15:16:58 +0200
+ -- Martin Zobel-Helas <[EMAIL PROTECTED]>  Sat, 05 Apr 2008 18:13:28 +0200
 
 devscripts (2.10.20) unstable; urgency=low
 

Modified: trunk/debian/control
===================================================================
--- trunk/debian/control        2008-04-05 13:56:09 UTC (rev 1242)
+++ trunk/debian/control        2008-04-05 16:16:29 UTC (rev 1243)
@@ -16,7 +16,7 @@
 Conflicts: debmake (<< 3.5), dupload (<< 2.1), suidmanager (<< 0.51),
  kdesdk-scripts (<< 4:3.5.6-2)
 Depends: dpkg-dev, debianutils (>= 2.0), perl (>= 5.8), sed (>= 2.95),
- ${shlibs:Depends}, ${misc:Depends}
+ ${shlibs:Depends}, ${misc:Depends}, libparse-debcontrol-perl
 Recommends: fakeroot
 Suggests: devscripts-el, at, build-essential, curl | wget, cvs-buildpackage,
  cvs | subversion | svk | tla | bzr | git-core | mercurial, dctrl-tools,

Modified: trunk/scripts/debchange.1
===================================================================
--- trunk/scripts/debchange.1   2008-04-05 13:56:09 UTC (rev 1242)
+++ trunk/scripts/debchange.1   2008-04-05 16:16:29 UTC (rev 1243)
@@ -198,7 +198,7 @@
 by ether appending a "+b1" to a non-binNMU version number or by
 incrementing a binNMU version number, and add a binNMU changelog comment.
 .TP
-.B \-\-qa
+.B \-\-qa ", " \-q
 Increment the Debian release number for a Debian QA Team upload, and
 add a QA upload changelog comment.
 .TP

Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl  2008-04-05 13:56:09 UTC (rev 1242)
+++ trunk/scripts/debchange.pl  2008-04-05 16:16:29 UTC (rev 1243)
@@ -40,6 +40,7 @@
 use Cwd;
 use lib '/usr/share/devscripts';
 use Devscripts::Debbugs;
+use Parse::DebControl;
 
 # Predeclare functions
 sub fatal($);
@@ -77,7 +78,7 @@
          Increment the Debian release number for a non-maintainer upload
   --bin-nmu
          Increment the Debian release number for a binary non-maintainer upload
-  --qa
+  -q, --qa
          Increment the Debian release number for a Debian QA Team upload
   -s, --security
          Increment the Debian release number for a Debian Security Team upload
@@ -142,7 +143,7 @@
          Display this help message and exit
   --version
          Display version information
-  At most one of -a, -i, -e, -r, -v, -d, -n, --bin-nmu, --qa, -s, --bpo, -l
+  At most one of -a, -i, -e, -r, -v, -d, -n, --bin-nmu, -q, --qa, -s, --bpo, -l
   (or their long equivalents) may be used.
   With no options, one of -i or -a is chosen by looking for a .upload
   file in the parent directory and checking its contents.
@@ -273,7 +274,7 @@
           "u|urgency=s" => \$opt_u,
           "n|nmu" => \$opt_n,
           "bin-nmu" => \$opt_bn,
-          "qa" => \$opt_qa,
+          "q|qa" => \$opt_qa,
           "s|security" => \$opt_s,
           "bpo" => \$opt_bpo,
           "l|local=s" => \$opt_l,
@@ -321,7 +322,7 @@
 if (defined $opt_regex) { $check_dirname_regex = $opt_regex; }
 
 # Only allow at most one non-help option
-fatal "Only one of -a, -i, -e, -r, -v, -d, -n/--nmu, --bin-nmu, --qa, 
-s/--security, --bpo, -l/--local is allowed;\ntry $progname --help for more 
help"
+fatal "Only one of -a, -i, -e, -r, -v, -d, -n/--nmu, --bin-nmu, -q/--qa, 
-s/--security, --bpo, -l/--local is allowed;\ntry $progname --help for more 
help"
     if ($opt_i?1:0) + ($opt_a?1:0) + ($opt_e?1:0) + ($opt_r?1:0) + 
($opt_v?1:0) + ($opt_d?1:0) + ($opt_n?1:0) + ($opt_bn?1:0) + ($opt_qa?1:0) + 
($opt_s?1:0) + ($opt_bpo?1:0) + ($opt_l?1:0) > 1;
 
 if ($opt_s) {
@@ -378,7 +379,7 @@
 if ($opt_create) {
     if ($opt_a || $opt_i || $opt_e || $opt_r || $opt_b || $opt_n || $opt_bn ||
            $opt_qa || $opt_s || $opt_bpo || $opt_l || $opt_allow_lower) {
-       warn "$progname warning: ignoring 
-a/-i/-e/-r/-b/--allow-lower-version/-n/--bin-nmu/--qa/-s/--bpo/-l options with 
--create\n";
+       warn "$progname warning: ignoring 
-a/-i/-e/-r/-b/--allow-lower-version/-n/--bin-nmu/-q/--qa/-s/--bpo/-l options 
with --create\n";
        $warnings++;
     }
     if ($opt_package && $opt_d) {
@@ -644,6 +645,27 @@
 
 #####
 
+if (! $opt_v) {
+
+    if (-f 'debian/control') {
+       my $parser = new Parse::DebControl;
+       my $deb822 = $parser->parse_file('debian/control', { });
+       my $uploader = $deb822->[0]->{'Uploaders'};
+       my $maintainer = $deb822->[0]->{'Maintainer'};
+       my @uploaders = split(/,\s+/, $uploader);
+
+       my $packager = "$MAINTAINER <$EMAIL>";
+
+       if (! grep { $_ eq $packager } ($maintainer, @uploaders)) {
+           $opt_n=1;
+       }
+
+    } else {
+       fatal "Missing file debian/control";
+    }
+}
+#####
+
 # Do we need to generate "closes" entries?
 
 my @closes_text = ();



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to