[devscripts] 01/01: origtargz: Fix unpacking of tarballs found in --path.
Christoph Berg
myon at debian.org
Tue Aug 9 08:32:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
myon pushed a commit to branch master
in repository devscripts.
commit 15d78fbece29646ae5f27f39f266b5e2720eeebb
Author: Christoph Berg <myon at debian.org>
Date: Tue Aug 9 10:32:45 2016 +0200
origtargz: Fix unpacking of tarballs found in --path.
---
debian/changelog | 3 +++
scripts/origtargz.pl | 12 +++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ad77df9..84c5def 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ devscripts (2.16.7) UNRELEASED; urgency=medium
* debchange: Add support for buster and bullseye
* bts: Add the "bullseye" and "bullseye-ignore" tags.
+ [ Christoph Berg ]
+ * origtargz: Fix unpacking of tarballs found in --path.
+
-- Paul Wise <pabs at debian.org> Fri, 15 Jul 2016 22:36:19 +0800
devscripts (2.16.6) unstable; urgency=medium
diff --git a/scripts/origtargz.pl b/scripts/origtargz.pl
index c9430b6..6d3369f 100755
--- a/scripts/origtargz.pl
+++ b/scripts/origtargz.pl
@@ -2,7 +2,7 @@
#
# origtargz: fetch the orig tarball of a Debian package from various sources,
# and unpack it
-# Copyright (C) 2012-2013 Christoph Berg <myon at debian.org>
+# Copyright (C) 2012-2016 Christoph Berg <myon at debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -234,7 +234,7 @@ sub download_origtar ()
link $f[0], "../$basename" or
symlink $f[0], "../$basename" or
die "symlink: $!";
- return $f[0];
+ return "../$basename";
}
}
@@ -329,18 +329,16 @@ sub unpack_tarball ($)
print "Unpacking $origtar\n";
# unpack
- chdir $tmpdir or die "chdir $tmpdir: $!";
- system ('tar', 'xf', "../$origtar");
+ system ('tar', "--directory=$tmpdir", '-xf', "$origtar");
if ($? >> 8) {
- print STDERR "tar xf $origtar failed\n";
+ print STDERR "unpacking $origtar failed\n";
return 0;
}
- chdir '..';
# figure out which directory was created
my @dirs = glob "$tmpdir/*/";
unless (@dirs) {
- print STDERR "tar xf $origtar did not create any directory\n";
+ print STDERR "unpacking $origtar did not create any directory\n";
return 0;
}
my $directory = $dirs[0];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list