[devscripts] 01/05: uscan: Pass a consistently formatted path to watch file's action
James McCoy
jamessan at debian.org
Sun Sep 21 01:48:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 4fb6349a6857f20388b35dbea9e45ec831eb2565
Author: James McCoy <jamessan at debian.org>
Date: Tue Sep 16 22:46:33 2014 -0400
uscan: Pass a consistently formatted path to watch file's action
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 3 +++
scripts/uscan.pl | 16 +++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cbc1523..40a1b17 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ devscripts (2.14.7) UNRELEASED; urgency=low
* grep-excuses: Remove useless call to “hostname --fqdn”. (Closes: #758668)
* build-rdeps: Recognize arch-qualified package names. Thanks to Stuart
Prescott for the patch. (Closes: #757807)
+ * uscan: Consistently pass the path to the downloaded (and possibly
+ renamed/symlinked/…) file as an argument to the watch file's action
+ command.
[ Benjamin Drung ]
* Remove unused build-dependencies libjson-perl and libterm-size-perl
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 1cb69f5..18739af 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1468,6 +1468,7 @@ EOF
# Call mk-origtargz (renames, repacks, etc.)
my $mk_origtargz_out;
+ my $path = "$destdir/$newfile_base";
my $target = $newfile_base;
unless ($symlink eq "no") {
my @cmd = ("mk-origtargz");
@@ -1482,14 +1483,15 @@ EOF
if ($exclusion && -e "debian/copyright");
push @cmd, "--copyright-file", $copyright_file
if ($exclusion && defined $copyright_file);
- push @cmd, "$destdir/$newfile_base";
+ push @cmd, $path;
spawn(exec => \@cmd,
to_string => \$mk_origtargz_out,
wait_child => 1);
chomp($mk_origtargz_out);
- $target = $1 if $mk_origtargz_out =~ /Successfully .* (?:to|as) ([^,]+)\.$/;
- $target = $1 if $mk_origtargz_out =~ /Leaving (.*) where it is/;
+ $path = $1 if $mk_origtargz_out =~ /Successfully .* (?:to|as) ([^,]+)\.$/;
+ $path = $1 if $mk_origtargz_out =~ /Leaving (.*) where it is/;
+ $target = basename($path);
}
if ($dehs) {
@@ -1497,8 +1499,8 @@ EOF
if (defined $mk_origtargz_out) {
$msg .= "$mk_origtargz_out\n";
}
- $dehs_tags{target} = basename($target);
- $dehs_tags{'target-path'} = $target;
+ $dehs_tags{target} = $target;
+ $dehs_tags{'target-path'} = $path;
dehs_msg($msg);
}
else {
@@ -1519,9 +1521,9 @@ EOF
}
if ($watch_version > 1) {
- push @cmd, "--upstream-version", $newversion, $target;
+ push @cmd, "--upstream-version", $newversion, $path;
} else {
- push @cmd, $target, $newversion;
+ push @cmd, $path, $newversion;
}
my $actioncmd = join(" ", @cmd);
print "-- Executing user specified script\n $actioncmd\n" if $verbose;
--
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