Commit fa34f831 authored by Salvatore Bonaccorso's avatar Salvatore Bonaccorso

Use dpkg-parsechangelog --show-field calls

parent 96e1f15c
......@@ -17,7 +17,7 @@ AUTOPKGTEST_SCRIPTS := $(notdir $(wildcard autopkgtest/scripts/runner))
AUTOPKGTEST_SCRIPTS_BUILDDEPS := $(notdir $(wildcard autopkgtest/scripts/build-deps.d/*))
AUTOPKGTEST_SCRIPTS_RUNTIMEDEPS := $(notdir $(wildcard autopkgtest/scripts/runtime-deps.d/*))
AUTOPKGTEST_SCRIPTS_HEAVYDEPS := $(notdir $(wildcard autopkgtest/scripts/heavy-deps.d/*))
VERSION := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }')
VERSION := $(shell dpkg-parsechangelog --show-field Version)
MAN_DIR := $(PREFIX)/share/man/man1
MAN5_DIR := $(PREFIX)/share/man/man5
......
......@@ -3,8 +3,8 @@
set -e
set -u
PKG=`dpkg-parsechangelog | awk '/^Source: / { print $2 }'`
VER=`dpkg-parsechangelog | awk '/^Version: / { print $2 }' | sed 's,^[0-9]\+:,,; s,-[^-]\+$,,'`
PKG=`dpkg-parsechangelog --show-field Source`
VER=`dpkg-parsechangelog --show-field Version | sed 's,^[0-9]\+:,,; s,-[^-]\+$,,'`
GOT_ONE=
for c in gz bz2 xz; do
......
......@@ -25,7 +25,7 @@ detect_dist() {
fi
}
PKG=`dpkg-parsechangelog | awk '/^Source: / { print $2 }'`
PKG=`dpkg-parsechangelog --show-field Source`
[ -n "$PKG" ]
......
......@@ -10,7 +10,7 @@ MESSAGE=""
while true; do
case "$1" in
--ignore|--ignore-version)
MESSAGE="IGNORE-VERSION: $(dpkg-parsechangelog | sed -n '/Version:/ {s/Version: //; p;}') # "
MESSAGE="IGNORE-VERSION: $(dpkg-parsechangelog --show-field Version) # "
shift
;;
--unreleased)
......
......@@ -31,7 +31,7 @@ fi
gbp-pull
# uscan and versions
PKG="$(dpkg-parsechangelog | egrep '^Source:' | cut -f 2 -d ' ')"
PKG="$(dpkg-parsechangelog --show-field Source)"
USCAN="$(uscan --report-status --dehs|| true)"
UVERSION="$(echo $USCAN | perl -nE '/<upstream-version>([^<]+)<\/upstream-version>/ and say $1')"
# in case of error, don't crash, just set to null string.
......@@ -52,7 +52,7 @@ fi
${IMPORT_CMD} --no-interactive --uscan --pristine-tar ${UTAG:+--upstream-vcs-tag="$UTAG"}
# Create a changelog entry as a start, and to un-confuse git-dch later
DVERSION="$(dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')"
DVERSION="$(dpkg-parsechangelog --show-field Version)"
# from uupdate
eval $(echo "$DVERSION" | perl -ne '/^(?:(\d+):)?(.*)/; print "EPOCH=$1\n";')
NEWVERSION="${UVERSION}-1"
......
......@@ -5,8 +5,8 @@
DIR=$(mktemp -d)
trap "rm -rf $DIR" QUIT TERM EXIT
PKG=$(dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p')
VER=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p')
PKG=$(dpkg-parsechangelog --show-field Source)
VER=$(dpkg-parsechangelog --show-field Version | sed -n 's/^\(.*\)-[^-]*/\1/p')
uscan --verbose --force-download --download-current-version --rename --destdir=$DIR
pristine-tar commit $DIR/${PKG}_${VER}.orig* upstream/$VER
......
......@@ -39,7 +39,7 @@ if [ ! -f "$3" ]; then
fi
VER="$2"
FILE="$3"
PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
PKG=`dpkg-parsechangelog --show-field Source`
SUFFIX="+dfsg"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment