Package: devscripts
Version: 2.10.11
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Besides the various options for nmu/qa/bpo versions and entries it
might be nice to have also a --binnmu option.

The attached patch is a quick attempt to implement it.

Cheers,
gregor

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing'), (500, 
'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22.200711252252
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  debianutils                   2.28.2     Miscellaneous utilities specific t
ii  dpkg-dev                      1.14.14    package building tools for Debian
ii  libc6                         2.7-5      GNU C Library: Shared libraries
ii  perl                          5.8.8-12   Larry Wall's Practical Extraction 
ii  sed                           4.1.5-5    The GNU sed stream editor

Versions of packages devscripts recommends:
ii  fakeroot                      1.8.10     Gives a fake root environment

- -- debconf-show failed

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHebEcOzKYnQDzz+QRAmm6AJ9XSC5YCnvrUXL3ImeDLTKfhM2C0wCbBxUz
vfy2uqW74Qe/7QOjgLLuZ8U=
=pVjr
-----END PGP SIGNATURE-----
--- /usr/bin/debchange  2007-11-14 22:57:53.000000000 +0100
+++ bin/debchange       2008-01-01 04:07:25.000000000 +0100
@@ -86,6 +86,8 @@
          Specify the package name when using --create (optional)
   -n, --nmu
          Increment the Debian release number for a non-maintainer upload
+  --binnmu
+         Increment the Debian release number for a binary non-maintainer upload
   --qa
          Increment the Debian release number for a Debian QA Team upload
   --bpo
@@ -242,7 +244,7 @@
 # with older debchange versions.
 my ($opt_help, $opt_version);
 my ($opt_i, $opt_a, $opt_e, $opt_r, $opt_v, $opt_b, $opt_d, $opt_D, $opt_u, 
$opt_t);
-my ($opt_n, $opt_qa, $opt_bpo, $opt_c, $opt_m, $opt_create, $opt_package, 
@closes);
+my ($opt_n, $opt_bn, $opt_qa, $opt_bpo, $opt_c, $opt_m, $opt_create, 
$opt_package, @closes);
 my ($opt_news);
 my ($opt_ignore, $opt_level, $opt_regex, $opt_noconf);
 
@@ -263,6 +265,7 @@
           "D|distribution=s" => \$opt_D,
           "u|urgency=s" => \$opt_u,
           "n|nmu" => \$opt_n,
+          "binnmu" => \$opt_bn,
           "qa" => \$opt_qa,
           "bpo" => \$opt_bpo,
           "query!" => \$opt_query,
@@ -309,8 +312,8 @@
 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, --qa, --bpo 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_qa?1:0) + ($opt_bpo?1:0) > 1;
+fatal "Only one of -a, -i, -e, -r, -v, -d, -n/--nmu, --binnmu, --qa, --bpo 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_bpo?1:0) > 1;
 
 if (defined $opt_u) {
     fatal "Urgency can only be one of: low, medium, high, critical, emergency"
@@ -360,8 +363,8 @@
     if $opt_package && $opt_news;
 
 if ($opt_create) {
-    if ($opt_a || $opt_i || $opt_e || $opt_r || $opt_b || $opt_n || $opt_qa || 
$opt_bpo) {
-       warn "$progname warning: ignoring -a/-i/-e/-r/-b/-n/--qa/--bpo options 
with --create\n";
+    if ($opt_a || $opt_i || $opt_e || $opt_r || $opt_b || $opt_n || $opt_bn || 
$opt_qa || $opt_bpo) {
+       warn "$progname warning: ignoring -a/-i/-e/-r/-b/-n/--binnmu/--qa/--bpo 
options with --create\n";
        $warnings++;
     }
     if ($opt_package && $opt_d) {
@@ -801,7 +804,7 @@
 my ($NEW_VERSION, $NEW_SVERSION, $NEW_UVERSION);
 my $line;
 
-if (($opt_i || $opt_n || $opt_qa || $opt_bpo || $opt_v || $opt_d ||
+if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_bpo || $opt_v || $opt_d ||
     ($opt_news && $VERSION ne $changelog{'Version'})) && ! $opt_create) {
 
     # Check that a given explicit version number is sensible.
@@ -877,6 +880,8 @@
                } else {
                    $end += 0.1;
                }
+           } elsif ($opt_bn and not $start =~ /\+b/) {
+                    $end .= "+b1";
            } elsif ($opt_qa and $start =~/(.*?)-(\d+)\.$/) {
                    # Drop NMU revision when doing a QA upload
                    my $upstream_version = $1;
@@ -912,6 +917,10 @@
     if ($opt_n && ! $opt_news) {
        print O "  * Non-maintainer upload.\n";
        $line = 1;
+    } elsif ($opt_bn && ! $opt_news) {
+        my $arch = qx/dpkg-architecture -qDEB_BUILD_ARCH/; chomp ($arch);
+        print O "  * Binary-only non-maintainer upload for $arch; no source 
changes.\n";
+        $line = 1;    
     } elsif ($opt_qa && ! $opt_news) {
        print O "  * QA upload.\n";
        $line = 1;

Reply via email to