[dh-make-perl] 02/05: Untangle checks for pristine-tar and tarball in git_add_debian()

Axel Beckert abe at deuxchevaux.org
Sun Jan 19 16:37:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository dh-make-perl.

commit ee9d86ec44f885b28af21bc342e79804913eb97a
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Sun Jan 19 14:26:58 2014 +0100

    Untangle checks for pristine-tar and tarball in git_add_debian()
    
    Closes: #735968
---
 debian/changelog               |  5 +++++
 lib/DhMakePerl/Command/make.pm | 13 +++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d695e32..cb621c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 dh-make-perl (0.81-1) UNRELEASED; urgency=medium
 
+  TODO: Verify fix for #735968 after submitter has reported an example
+    module to reproduce
+
   [ Dima Kogan ]
   * If I can't parse pkgname or version, quit with a useful error message.
     Before this patch, perl would throw up errors about trying to do stuff
@@ -27,6 +30,8 @@ dh-make-perl (0.81-1) UNRELEASED; urgency=medium
 
   [ Axel Beckert ]
   * Apply wrap-and-sort.
+  * Untangle checks for pristine-tar and upstream tarball in
+    git_add_debian() (Closes: #735968)
 
  -- Dima Kogan <dima at secretsauce.net>  Wed, 25 Dec 2013 17:08:35 +0100
 
diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
index f08fe15..55f3174 100644
--- a/lib/DhMakePerl/Command/make.pm
+++ b/lib/DhMakePerl/Command/make.pm
@@ -749,10 +749,15 @@ sub git_add_debian {
             $self->pkgname ),
     ) if $self->cfg->pkg_perl;
 
-    if ( File::Which::which('pristine-tar') and $tarball ) {
-        $ENV{GIT_DIR} = File::Spec->catdir( $self->main_dir, '.git' );
-        system( 'pristine-tar', 'commit', $tarball, "upstream/".$self->version ) >= 0
-            or warn "error running pristine-tar: $!\n";
+    if ( File::Which::which('pristine-tar') ) {
+        if ( $tarball and -f $tarball ) {
+            $ENV{GIT_DIR} = File::Spec->catdir( $self->main_dir, '.git' );
+            system( 'pristine-tar', 'commit', $tarball, "upstream/".$self->version ) >= 0
+                or warn "error running pristine-tar: $!\n";
+        }
+        else {
+            die "No tarball found to handle with pristine-tar. Bailing out."
+        }
     }
     else {
         warn "W: pristine-tar not available. Please run\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



More information about the Pkg-perl-cvs-commits mailing list