summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-03-24 11:30:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-03-24 11:32:09 +0000
commit76f3ac4058ab7747efd0d91ec34cbe883a946fe0 (patch)
tree637bd56f88fe8eb887548c16dd843b7d7356424c
parent834cb718f62879ea5e68342ff81e66fb7c9f760d (diff)
downloadabuild-76f3ac4058ab7747efd0d91ec34cbe883a946fe0.tar.gz
abuild-76f3ac4058ab7747efd0d91ec34cbe883a946fe0.tar.bz2
abuild-76f3ac4058ab7747efd0d91ec34cbe883a946fe0.tar.xz
abuild-76f3ac4058ab7747efd0d91ec34cbe883a946fe0.zip
abuild: fix -K option
make sure we don't delete files when -K is specified fixes #7008
-rw-r--r--abuild.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/abuild.in b/abuild.in
index a34ba2d..7cef63f 100644
--- a/abuild.in
+++ b/abuild.in
@@ -78,8 +78,8 @@ want_check() {
cleanup() {
local i=
[ -z "$subpkgdir" ] && set_xterm_title ""
- if [ -n "$CLEANUP_FILES" ]; then
- rm -f $CLEANUP_FILES
+ if [ -n "$keep_build" ]; then
+ return 0
fi
for i; do
case $i in
@@ -1637,7 +1637,7 @@ rootpkg() {
cd "$startdir"
rm -rf "$pkgdir"
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
- do_fakeroot "$abuild_path" $color_opt \
+ do_fakeroot "$abuild_path" $color_opt $keep_build \
$_package \
prepare_subpackages \
prepare_language_packs \
@@ -1952,8 +1952,9 @@ builddeps() {
export ABUILD_VISITED="$ABUILD_VISITED $pkg"
msg "Entering $dir"
- cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
- $recursive $upgrade $color_opt abuildindex || return 1
+ cd "$dir" && $0 $forceroot $keep $keep_build $quiet \
+ $install_deps $recursive $upgrade $color_opt \
+ abuildindex || return 1
done
$SUDO_APK add --upgrade --repository "$REPODEST/$repo" \
$apk_opt_wait \
@@ -2261,7 +2262,7 @@ while getopts "AcdfFhkKimnp:P:qrRs:u" opt; do
'F') forceroot="-F";;
'h') usage;;
'k') keep="-k";;
- 'K') CLEANUP="" ERROR_CLEANUP="" ;;
+ 'K') keep_build="-K";;
'm') disable_colors
color_opt="-m";;
'n') die "Use newapkbuild to create new aports";;