The following commit has been merged in the master branch:
commit 54e32a1d3986bff5669332703eae9268e164f1c4
Author: James Vega <[email protected]>
Date:   Sun Jul 11 15:16:09 2010 -0400

    debchange: Use <dist>-backports as the target distribution for backports.
    
    Closes: #588502
    Signed-off-by: James Vega <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index ee9a4b9..1150b32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ devscripts (2.10.65) UNRELEASED; urgency=low
   * debcheckout: Specifically call out that Debian hosts are already handled
     in DEBCHECKOUT_AUTH_URLS' description.  Thanks to martin f. krafft for the
     suggested wording.  (Closes: #530581)
+  * debchange: When running “dch -r”, use <dist>-backports if a backports
+    upload is detected.  (Closes: #588502)
 
   [ Martin Zobel-Helas ]
   * Remove svk from Recommends, it is no longer in the archive. (Closes:
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 1f9b008..641fb59 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -1161,18 +1161,25 @@ if (($opt_r || $opt_a || $merge) && ! $opt_create) {
            # maintainer
            $nextmaint ||= $1;
        }
-       elsif (defined $lastmaint) {
-           if (m/^\w[-+0-9a-z.]* \([^\(\) 
\t]+\)((?:\s+[-+0-9a-z.]+)+)\;\s+urgency=(\w+)/i) {
+       elsif (m/^\w[-+0-9a-z.]* \(([^\(\) 
\t]+)\)((?:\s+[-+0-9a-z.]+)+)\;\s+urgency=(\w+)/i) {
+           if (defined $lastmaint) {
                $lastheader = $_;
-               $lastdist = $1;
+               $lastdist = $2;
                $lastdist =~ s/^\s+//;
                undef $lastdist if $lastdist eq "UNRELEASED";
                # Revert to our previously saved position
                $line = $savedline;
                last;
            }
+           else {
+               my $tmpver = $1;
+               $tmpver =~ s/^\s+//;
+               if ($tmpver =~ m/~bpo(\d+)\+/ && exists $bpo_dists{$1}) {
+                   $dist_indicator = "$bpo_dists{$1}-backports";
+               }
+           }
        }
-       elsif (/  \* Upload to ([^ ]+).*$/) {
+       elsif (/  \* (?:Upload to|Rebuild for) (\S+).*$/) {
            ($dist_indicator = $1) =~ s/[!:.,;]$//;
            chomp $dist_indicator;
        }

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to