The following commit has been merged in the lenny branch:
commit 21d69014f424f670a9ccdce3a7aad11e3b3f1b60
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Fri Aug 15 11:07:48 2008 +0200

    dpkg-source: don't use -i/-I by default for "1.0" source packages
    
    * Dpkg/Source/Package.pm (new): Call init_options() only if
    initialize() has been called as it's supposed to be called
    only after the object has been upgraded to its target type.
    (init_options): add a comment that explains that this function is
    not called by Dpkg::Source::Package::V1::init_options() and
    render the function more robust.

diff --git a/ChangeLog b/ChangeLog
index 068defe..6659175 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-15  Raphael Hertzog  <[EMAIL PROTECTED]>
+
+       * Dpkg/Source/Package.pm (new): Call init_options() only if
+       initialize() has been called as it's supposed to be called
+       only after the object has been upgraded to its target type.
+       (init_options): add a comment that explains that this function is
+       not called by Dpkg::Source::Package::V1::init_options() and
+       render the function more robust.
+
 2008-08-15  Ian Jackson  <[EMAIL PROTECTED]>
 
        * src/packages.c (process_queue): When onerr_abort is bigger than 0
diff --git a/debian/changelog b/debian/changelog
index 5621a4d..2a02d6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ dpkg (1.14.21) UNRELEASED; urgency=low
   * Modified Dpkg::BuildOptions to recognize and use spaces as separator
     in DEB_BUILD_OPTIONS (in order to conform with the Debian policy
     ruling established in #430649).
+  * Fix dpkg-source to not use -i and -I by default with "1.0" source
+    packages. Closes: #495138
 
   [ Guillem Jover ]
   * When loading the status file fix up any inconsistent package in state
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 9ca9643..c9441b9 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -100,22 +100,27 @@ sub new {
         'options' => {},
     };
     bless $self, $class;
+    if (exists $args{'options'}) {
+        $self->{'options'} = $args{'options'};
+    }
     if (exists $args{"filename"}) {
         $self->initialize($args{"filename"});
+        $self->init_options();
     }
-    if (exists $args{"options"}) {
-        $self->{'options'} = $args{'options'};
-    }
-    $self->init_options();
     return $self;
 }
 
 sub init_options {
     my ($self) = @_;
     # Use full ignore list by default
+    # note: this function is not called by V1 packages
     $self->{'options'}{'diff_ignore_regexp'} ||= $diff_ignore_default_regexp;
-    $self->{'options'}{'tar_ignore'} = [ @tar_ignore_default_pattern ]
+    if (defined $self->{'options'}{'tar_ignore'}) {
+        $self->{'options'}{'tar_ignore'} = [ @tar_ignore_default_pattern ]
             unless @{$self->{'options'}{'tar_ignore'}};
+    } else {
+        $self->{'options'}{'tar_ignore'} = [ @tar_ignore_default_pattern ];
+    }
 }
 
 sub initialize {

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to