summaryrefslogtreecommitdiff
path: root/dh_lib
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:53:30 +0000
committerjoey <joey>1999-08-17 04:53:30 +0000
commit94daae34cb1be6ed6a4591604af22c5d43542475 (patch)
tree27db41cbc3d1a94e785a483da40bc5acee4985a9 /dh_lib
parent8dd0b78a876be37d3be52d7dc2e7eecd957064bb (diff)
downloaddebhelper-94daae34cb1be6ed6a4591604af22c5d43542475.tar.gz
r94: Initial Import
Diffstat (limited to 'dh_lib')
-rw-r--r--dh_lib7
1 files changed, 6 insertions, 1 deletions
diff --git a/dh_lib b/dh_lib
index 9e826499..7ebc8be1 100644
--- a/dh_lib
+++ b/dh_lib
@@ -82,13 +82,18 @@ pkgext() {
# Caches return code so it only needs to run dpkg-parsechangelog once.
isnative() {
if [ -z "$DH_ISNATIVE" ]; then
+ # Make sure we look at the correct changelog.
+ isnative_changelog=`pkgfile $PACKAGE changelog`
+ if [ ! "$isnative_changelog" ]; then
+ isnative_changelog=debian/changelog
+ fi
# Get the package version.
# Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it
# output a bogus error message to stderr.
# If it actually has a real error, then the expr will fail, and this whole
# script will come crashing to a halt, which is good enough to inform
# the user something's wrong. :-)
- VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : \
+ VERSION=`expr "\`dpkg-parsechangelog -l$isnative_changelog 2>/dev/null\`" : \
'.*Version: \(.*\).*Distribution:'`
# Is this a native Debian package?
if expr "$VERSION" : '.*-' >/dev/null; then