From 0220db606e27af7f6b33c95855e9ab0dabfdfdb2 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Wed, 31 Oct 2018 10:00:42 +0100 Subject: [PATCH 1/2] uscan: fix default compression suffix in git HEAD Closes: #912403 --- debian/changelog | 9 ++++++--- lib/Devscripts/Uscan/Utils.pm | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cddd2163..4b0e5f8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,15 @@ devscripts (2.18.8) UNRELEASED; urgency=medium - [ Xavier Guimard ] - * French translation update. - [ Reiner Herrmann ] * nmudiff: + Check for neomutt if mutt is not available. Closes: #912083 + [ Xavier Guimard ] + * French translation update. + * uscan: + + fix default compression suffix in git HEAD mode. + Closes: #912403; MR: !81 + -- Mattia Rizzolo Sun, 28 Oct 2018 16:30:43 +0100 devscripts (2.18.7) unstable; urgency=medium diff --git a/lib/Devscripts/Uscan/Utils.pm b/lib/Devscripts/Uscan/Utils.pm index 2b6ec219..e65c776b 100644 --- a/lib/Devscripts/Uscan/Utils.pm +++ b/lib/Devscripts/Uscan/Utils.pm @@ -136,6 +136,9 @@ sub get_suffix ($) { # Normalize compression methods to the names used by Dpkg::Compression if (exists $opt2suffix{$compression}) { $canonical_suffix = $opt2suffix{$compression}; + } elsif ($compression eq 'default') { + require Devscripts::MkOrigtargz::Config; + return &Devscripts::MkOrigtargz::Config::default_compression; } else { uscan_die "$progname: invalid suffix, $compression given."; } -- GitLab From 667ec7d102754a12b02b909646e3fa23c70f315c Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Wed, 31 Oct 2018 12:26:57 +0100 Subject: [PATCH 2/2] uscan: add git-HEAD test --- test/test_uscan_git | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/test_uscan_git b/test/test_uscan_git index f0caea1d..b323c45d 100755 --- a/test/test_uscan_git +++ b/test/test_uscan_git @@ -97,11 +97,23 @@ makeDebianDirWithUpstream() { cd - } +makeDebianDirHead() { + WATCHARGS=$1 + makeDebianDir $WATCHARGS + cat < $TMPDIR/$PKG/debian/watch +version=4 +opts="mode=git,pretty=0.0+git%cd.%h" \ +file:///$TMPDIR/repo HEAD +END +} + helperLaunch() { WATCHARGS=$1 ARG="${2:-}" if test "$ARG" = "upstream"; then makeDebianDirWithUpstream $WATCHARGS + elif test "$ARG" = "HEAD"; then + makeDebianDirHead $WATCHARGS else makeDebianDir $WATCHARGS fi @@ -118,6 +130,16 @@ testGit() { cleanup } +testGitHead() { + helperLaunch "pgpmode=none" HEAD + ORIG=$(ls $TMPDIR|perl -ne 'print if/^foo.*\.orig\.tar\.xz/') + UPSTREAM=$(ls $TMPDIR|perl -ne 'print if/^foo.*(?