1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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>
This commit is contained in:
Allan McRae 2014-05-25 13:53:19 +10:00
parent ec01a22f7d
commit 2401468f51
2 changed files with 7 additions and 1 deletions

View File

@ -116,7 +116,8 @@ Options
*-p* <buildscript>::
Read the package script `buildscript` instead of the `PKGBUILD` default;
see linkman:PKGBUILD[5].
see linkman:PKGBUILD[5]. The `buildscript` must be located in the directory
makepkg is called from.
*-r, \--rmdeps*::
Upon successful build, remove any dependencies installed by makepkg

View File

@ -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