buildrepo: exit early if listing of packages for purging fails
Otherwise we might end up purging more packages than expected if an APKBUILD has syntax errors
This commit is contained in:
parent
3092986fc6
commit
7a447caf05
@ -146,7 +146,7 @@ do_build() {
|
|||||||
local purgefiles
|
local purgefiles
|
||||||
cd "$repodir/$repo/$CARCH" || return 1
|
cd "$repodir/$repo/$CARCH" || return 1
|
||||||
trap 'rm -f "$tmp"; exit 1' INT
|
trap 'rm -f "$tmp"; exit 1' INT
|
||||||
( listpackages "$1") >$tmp
|
( listpackages "$1") >$tmp || return 1
|
||||||
purge=$(ls *.apk 2>/dev/null | grep -v -w -f $tmp)
|
purge=$(ls *.apk 2>/dev/null | grep -v -w -f $tmp)
|
||||||
if [ -n "$purge" ]; then
|
if [ -n "$purge" ]; then
|
||||||
rm -f $purge
|
rm -f $purge
|
||||||
|
Loading…
x
Reference in New Issue
Block a user