[pacman-dev] [PATCH] makepkg: improve check and error message for buildfile location
Dave Reisner
dreisner at archlinux.org
Fri Jul 25 14:09:06 EDT 2014
The documentation very clearly states that the buildfile has to be in
$PWD, but the error thrown by makepkg reference some mysterious "build
directory". Simplify this check so that we more directly check that the
file being referred to is in fact in our $PWD. Revise the error message
when the check fails to more plainly point out the problem.
---
scripts/makepkg.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index eed047c..726df8f 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2919,8 +2919,8 @@ else
exit 1
fi
- if [[ ${BUILDFILE##*/} != "${BUILDFILE}" && ${BUILDFILE} != "${startdir}/${BUILDFILE##*/}" ]]; then
- error "$(gettext "%s must be in the build directory.")" "$BUILDFILE"
+ if [[ ! $BUILDFILE -ef $PWD/${BUILDFILE##*/} ]]; then
+ error "$(gettext "%s must be in the current working directory.")" "$BUILDFILE"
exit 1
fi
--
2.0.3
More information about the pacman-dev
mailing list