summaryrefslogtreecommitdiffstats
path: root/checkpkg
diff options
context:
space:
mode:
authorTravis Willard <travis@archlinux.org>2008-01-13 21:07:35 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-01-23 23:11:38 +0100
commit97d4a8bbd02c6813a6ef03ac9e8c2c48d68015a3 (patch)
tree248c43e499504af527cf650754efc6ffbc5b8124 /checkpkg
parent67485704135ef41d907a4c93db5fbcaee3960bc2 (diff)
downloaddevtools-97d4a8bbd02c6813a6ef03ac9e8c2c48d68015a3.tar.gz
devtools-97d4a8bbd02c6813a6ef03ac9e8c2c48d68015a3.tar.xz
Ensure pkgurl is always fully-qualified pathname in checkpkg.
This keeps the pkgurl variable consistently fully-qualified, so that whenever we use that variable we know it points straight at the package file. Signed-off-by: Travis Willard <travis@archlinux.org> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'checkpkg')
-rwxr-xr-xcheckpkg29
1 files changed, 14 insertions, 15 deletions
diff --git a/checkpkg b/checkpkg
index 2cffa78..d132e0c 100755
--- a/checkpkg
+++ b/checkpkg
@@ -27,18 +27,17 @@ source PKGBUILD
pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
-if [ ! -f $pkgfile ]; then
- if [ -f $PKGDEST/$pkgfile ]; then
- pkgfile=$PKGDEST/$pkgfile
- oldstylepkgfile=$PKGDEST/$oldstylepkgfile
- elif [ -f $oldstylepkgfile ]; then
- pkgfile=$oldstylepkgfile
- elif [ -f $PKGDEST/$oldstylepkgfile ]; then
- pkgfile=$PKGDEST/$oldstylepkgfile
- else
- echo "File $pkgfile doesn't exist"
- exit 1
- fi
+if [ -f "$(pwd)/$pkgfile" ]; then
+ pkgfile=$(pwd)/$pkgfile
+elif [ -f "$PKGDEST/$pkgfile" ]; then
+ pkgfile=$PKGDEST/$pkgfile
+elif [ -f "$(pwd)/$oldstylepkgfile" ]; then
+ pkgfile=$(pwd)/$oldstylepkgfile
+elif [ -f "$PKGDEST/$oldstylepkgfile" ]; then
+ pkgfile=$PKGDEST/$oldstylepkgfile
+else
+ echo "File \"$pkgfile\" doesn't exist"
+ exit 1
fi
tmp=`pacman -Spd --noconfirm $pkgname`
@@ -52,7 +51,7 @@ pkgurl=`echo $tmp | rev | cut -d ' ' -f 1 | rev`
oldpkg=`strip_url $pkgurl`
-if [ "$oldpkg" = "$pkgfile" ]; then
+if [ "$(basename $oldpkg)" = "$(basename $pkgfile)" ]; then
echo "The built package is the one in the repo right now!"
exit 1
fi
@@ -66,7 +65,7 @@ if [ ! -f $oldpkg ]; then
fi
tar tzf $oldpkg > filelist-old
-tar tzf $pkgfile > filelist
+tar tzf "$pkgfile" > filelist
sort -o filelist filelist
sort -o filelist-old filelist-old
@@ -76,7 +75,7 @@ diff filelist-old filelist
if diff filelist-old filelist | grep '\.so\.' > /dev/null 2>&1; then
mkdir -p pkg
cd pkg
- tar xzf ../$pkgfile > /dev/null
+ tar xzf "$pkgfile" > /dev/null
for i in `diff ../filelist-old ../filelist | grep \> | grep \.so\. | awk '{print $2}'`; do
echo -n "${i}: "
objdump -p $i | grep SONAME