Commit 76f3ac40 authored by Natanael Copa's avatar Natanael Copa

abuild: fix -K option

make sure we don't delete files when -K is specified

fixes #7008
parent 834cb718
...@@ -78,8 +78,8 @@ want_check() { ...@@ -78,8 +78,8 @@ want_check() {
cleanup() { cleanup() {
local i= local i=
[ -z "$subpkgdir" ] && set_xterm_title "" [ -z "$subpkgdir" ] && set_xterm_title ""
if [ -n "$CLEANUP_FILES" ]; then if [ -n "$keep_build" ]; then
rm -f $CLEANUP_FILES return 0
fi fi
for i; do for i; do
case $i in case $i in
...@@ -1637,7 +1637,7 @@ rootpkg() { ...@@ -1637,7 +1637,7 @@ rootpkg() {
cd "$startdir" cd "$startdir"
rm -rf "$pkgdir" rm -rf "$pkgdir"
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..." [ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
do_fakeroot "$abuild_path" $color_opt \ do_fakeroot "$abuild_path" $color_opt $keep_build \
$_package \ $_package \
prepare_subpackages \ prepare_subpackages \
prepare_language_packs \ prepare_language_packs \
...@@ -1952,8 +1952,9 @@ builddeps() { ...@@ -1952,8 +1952,9 @@ builddeps() {
export ABUILD_VISITED="$ABUILD_VISITED $pkg" export ABUILD_VISITED="$ABUILD_VISITED $pkg"
msg "Entering $dir" msg "Entering $dir"
cd "$dir" && $0 $forceroot $keep $quiet $install_deps \ cd "$dir" && $0 $forceroot $keep $keep_build $quiet \
$recursive $upgrade $color_opt abuildindex || return 1 $install_deps $recursive $upgrade $color_opt \
abuildindex || return 1
done done
$SUDO_APK add --upgrade --repository "$REPODEST/$repo" \ $SUDO_APK add --upgrade --repository "$REPODEST/$repo" \
$apk_opt_wait \ $apk_opt_wait \
...@@ -2261,7 +2262,7 @@ while getopts "AcdfFhkKimnp:P:qrRs:u" opt; do ...@@ -2261,7 +2262,7 @@ while getopts "AcdfFhkKimnp:P:qrRs:u" opt; do
'F') forceroot="-F";; 'F') forceroot="-F";;
'h') usage;; 'h') usage;;
'k') keep="-k";; 'k') keep="-k";;
'K') CLEANUP="" ERROR_CLEANUP="" ;; 'K') keep_build="-K";;
'm') disable_colors 'm') disable_colors
color_opt="-m";; color_opt="-m";;
'n') die "Use newapkbuild to create new aports";; 'n') die "Use newapkbuild to create new aports";;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment