mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-11 06:37:31 +00:00
abuild: don't cd to $builddir unless patches exists
some packages don't have patches. We should not error if builddir is not set in this case.
This commit is contained in:
parent
3e69161ff7
commit
d413730550
13
abuild.in
13
abuild.in
@ -530,8 +530,21 @@ getpkgver() {
|
||||
fi
|
||||
}
|
||||
|
||||
have_patches() {
|
||||
local i
|
||||
for i in $source; do
|
||||
case "$i" in
|
||||
*.patch) return 0;;
|
||||
esac
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
default_prepare() {
|
||||
local i
|
||||
if ! have_patches; then
|
||||
return 0
|
||||
fi
|
||||
cd "${builddir:-$srcdir/$pkgname-$pkgver}" \
|
||||
|| { error "Is \$builddir set correctly?"; return 1; }
|
||||
for i in $source; do
|
||||
|
Loading…
Reference in New Issue
Block a user