1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

Ensure pkgbase/epoch are defined before doing anything

When generating integrity sums, we could get some weird output before due to
epoch being uninitialized:

    /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37")

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-02-09 07:54:42 -06:00
parent 942bb9e64a
commit 62fc966882

View File

@ -1850,6 +1850,10 @@ else
source "$BUILDFILE" source "$BUILDFILE"
fi fi
# set defaults if they weren't specified in buildfile
pkgbase=${pkgbase:-${pkgname[0]}}
epoch=${epoch:-0}
if (( GENINTEG )); then if (( GENINTEG )); then
mkdir -p "$srcdir" mkdir -p "$srcdir"
chmod a-s "$srcdir" chmod a-s "$srcdir"
@ -1859,9 +1863,6 @@ if (( GENINTEG )); then
exit 0 # $E_OK exit 0 # $E_OK
fi fi
pkgbase=${pkgbase:-${pkgname[0]}}
epoch=${epoch:-0}
# check the PKGBUILD for some basic requirements # check the PKGBUILD for some basic requirements
check_sanity || exit 1 check_sanity || exit 1