The following commit has been merged in the master branch:
commit f3418186f6b093162d9e6b47e73d01d795c2ef98
Author: Guillem Jover <guil...@debian.org>
Date:   Tue Aug 23 05:24:39 2011 +0200

    dpkg-source: Make single-debian-patch not abort on upstream changes
    
    The single-debian-patch option usage in Dpkg::Source::Package::V2
    was typoed as single_debian_patch, and thus not avoiding aborting
    on upstream changes. Instead of fixing the typo, let's just not
    expose single-debian-patch in Dpkg::Source::Package::V2, as it's
    Dpkg::Source::Package::V3::quilt specific and as such a layer
    violation, the code will just set auto_commit when single-debian-patch
    is specified, which is the actual intended behaviour. Reflect this
    explicitly in the man page.
    
    Regression introduced in commit 46b688e4824f00842568b517b119eec34a5f7286.
    
    Reported-by: Bernhard R. Link <brl...@debian.org>

diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index e124fe6..d649b0d 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -445,7 +445,7 @@ or \fBdebian\-changes\fP, depending on 
\fB\-\-single\-debian\-patch\fP) are
 applied. The temporary directory is compared to the source package
 directory. When the diff is non-empty, the build fails unless
 \fB\-\-single\-debian\-patch\fP or \fB\-\-auto\-commit\fP
-has been used. In the latter case, the diff is stored in the automatic patch.
+has been used, in which case the diff is stored in the automatic patch.
 If the automatic patch is created/deleted, it's added/removed from the
 series file and from the quilt metadata.
 
diff --git a/scripts/Dpkg/Source/Package/V2.pm 
b/scripts/Dpkg/Source/Package/V2.pm
index 12d448a..53a6699 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -501,8 +501,7 @@ sub do_build {
     my $tmpdiff = $self->generate_patch($dir, order_from => $autopatch,
                                         handle_binary => $handle_binary,
                                         usage => 'build');
-    unless (-z $tmpdiff or $self->{'options'}{'single_debian_patch'}
-            or $self->{'options'}{'auto_commit'}) {
+    unless (-z $tmpdiff or $self->{'options'}{'auto_commit'}) {
         info(_g("you can integrate the local changes with %s"),
              "dpkg-source --commit");
         error(_g("aborting due to unexpected upstream changes, see %s"),
diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm 
b/scripts/Dpkg/Source/Package/V3/quilt.pm
index 2fbcba2..e45016f 100644
--- a/scripts/Dpkg/Source/Package/V3/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm
@@ -54,6 +54,8 @@ sub parse_cmdline_option {
     return 1 if $self->SUPER::parse_cmdline_option($opt);
     if ($opt =~ /^--single-debian-patch$/) {
         $self->{'options'}{'single-debian-patch'} = 1;
+        # For backwards compatibility.
+        $self->{'options'}{'auto_commit'} = 1;
         return 1;
     } elsif ($opt =~ /^--allow-version-of-quilt-db=(.*)$/) {
         push @{$self->{'options'}{'allow-version-of-quilt-db'}}, $1;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to