[SCM] Debian packaging of dh-make-perl branch, master, updated. debian/0.74-1-10-g0eec0e6

Damyan Ivanov dmn at debian.org
Sun Sep 25 14:06:35 UTC 2011


The following commit has been merged in the master branch:
commit 865e1c85fc72b2bf2a7ec897045bf47cbc4967df
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun Sep 25 16:25:08 2011 +0300

    fail gracefuly if pristine-tar is not available

diff --git a/debian/changelog b/debian/changelog
index c3310a7..33984b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ dh-make-perl (0.74-2) UNRELEASED; urgency=low
 
   * setup Git repository in --vcs=git even without --pkg-perl
   * when setting up Git repository, add remote only in --pkg-perl mode
+  * fail gracefuly if pristine-tar is not available
 
  -- Damyan Ivanov <dmn at debian.org>  Sun, 25 Sep 2011 16:23:22 +0300
 
diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
index d477255..ac08a11 100644
--- a/lib/DhMakePerl/Command/make.pm
+++ b/lib/DhMakePerl/Command/make.pm
@@ -590,6 +590,7 @@ sub setup_git_repository {
 
     require Git;
     require IO::Dir;
+    require File::Which;
 
     Git::command( 'init', $self->main_dir );
 
@@ -611,9 +612,18 @@ sub setup_git_repository {
             $self->pkgname ),
     ) if $self->cfg->pkg_perl;
 
-    $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') ) {
+        $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 {
+        warn "W: pristine-tar not available. Please run\n";
+        warn "W:     apt-get install pristine-tar\n";
+        warn "W:  followed by\n";
+        warn "W:     pristine-tar commit $tarball upstream/"
+            . $self->version . "\n";
+    }
 }
 
 =item warning I<string> ...

-- 
Debian packaging of dh-make-perl



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