diff options
author | Allan McRae <allan@archlinux.org> | 2014-05-25 05:53:19 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-05-25 05:53:19 +0200 |
commit | 2401468f5104fa6794589381cef9e970692d95e8 (patch) | |
tree | 754e35b616d9c5385d88d23cb85a3307776766ba /scripts | |
parent | ec01a22f7d13147a52ac8c0c1ee1b5fc2426de39 (diff) | |
download | pacman-2401468f5104fa6794589381cef9e970692d95e8.tar.gz pacman-2401468f5104fa6794589381cef9e970692d95e8.tar.xz |
makepkg: Force buildscripts to be in startdir
We expect all source file to lie in $startdir. However, using
"makepkg -p <buildscript>" can currently allows people to specify buildscripts
in other directories. This results in confusion about where other sources
should lie (in startdir or in the directory that the buildscript is in).
Explicitly disable using -p for files in other directories to avoid this issue.
Fixes FS#40293.
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 96e53499..de92e933 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2906,6 +2906,11 @@ else exit 1 fi + if [[ ${BUILDFILE##*/} != "${BUILDFILE}" && ${BUILDFILE} != "${startdir}/${BUILDFILE##*/}" ]]; then + error "$(gettext "%s must be in the build directory.")" "$BUILDFILE" + exit 1 + fi + if [[ ${BUILDFILE:0:1} != "/" ]]; then BUILDFILE="$startdir/$BUILDFILE" fi |