[pkg-perl-tools] 01/01: dpt-import-orig: imporve upstream tag handling.

gregor herrmann gregoa at debian.org
Thu Aug 13 10:23:14 UTC 2015


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

gregoa pushed a commit to branch master
in repository pkg-perl-tools.

commit bf4bfdc3ae0bbd37c22cd0ccf9b756ec212983b4
Author: gregor herrmann <gregoa at debian.org>
Date:   Thu Aug 13 12:21:44 2015 +0200

    dpt-import-orig: imporve upstream tag handling.
    
    When looking for upstream tags, also check for versions with trailing zeros
    removed which we sometimes add in uversionmangle.
---
 scripts/import-orig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/import-orig b/scripts/import-orig
index e37b9b2..5b909bd 100755
--- a/scripts/import-orig
+++ b/scripts/import-orig
@@ -34,9 +34,13 @@ gbp pull
 PKG="$(dpkg-parsechangelog --show-field Source)"
 USCAN="$(uscan --report-status --dehs|| true)"
 UVERSION="$(echo $USCAN | perl -nE '/<upstream-version>([^<]+)<\/upstream-version>/ and say $1')"
+UVERSIONZERO="$(echo "$UVERSION" | perl -ne 'print if s/0+$//')"
 # in case of error, don't crash, just set to null string.
 UTAG=''
 UTAG="$(git tag | grep -x "v\?$UVERSION" || git tag | grep -- "-$UVERSION\$")" || /bin/true
+if [ -z "$UTAG" ] && [ -n "$UVERSIONZERO" ]; then
+	UTAG="$(git tag | grep -x "v\?$UVERSIONZERO" || git tag | grep -- "-$UVERSIONZERO\$")" || /bin/true
+fi
 UNAME=$(awk '/Upstream-Name:/ {print $2;}' debian/copyright)
 
 # download and import

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



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