Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartchus <martchus@gmx.net>2017-08-22 00:30:17 +0200
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-08-24 17:20:59 +0200
commitd0e684d2e998a9e7f241dc641c1f5273dba71036 (patch)
tree60bcc00c037987b1988538309172b0fb198f8c55
parent000ea6c7bbf6191bd284468dde4eb352757e84df (diff)
makechrootpkg: Prevent removing build dir when --noextract specified
-rw-r--r--makechrootpkg.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8d8fd05..f8815d8 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -18,7 +18,7 @@ shopt -s nullglob
init_variables() {
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
makepkg_args=("${default_makepkg_args[@]}")
- repack=false
+ keepbuilddir=false
update_first=false
clean_first=false
run_namcap=false
@@ -178,17 +178,17 @@ install_packages() {
return $ret
}
-# Usage: prepare_chroot $copydir $HOME $repack $run_namcap
+# Usage: prepare_chroot $copydir $HOME $keepbuilddir $run_namcap
# Globals:
# - MAKEFLAGS
# - PACKAGER
prepare_chroot() {
local copydir=$1
local USER_HOME=$2
- local repack=$3
+ local keepbuilddir=$3
local run_namcap=$4
- $repack || rm -rf "$copydir/build"
+ $keepbuilddir || rm -rf "$copydir/build"
local builduser_uid builduser_gid
builduser_uid="${SUDO_UID:-$UID}"
@@ -359,8 +359,8 @@ main() {
# See if -R was passed to makepkg
for arg in "${@:OPTIND}"; do
case ${arg%%=*} in
- -*R*|--repackage)
- repack=true
+ -*R*|--repackage|--noextract)
+ keepbuilddir=true
break 2
;;
esac
@@ -408,7 +408,7 @@ main() {
download_sources "$copydir" "$makepkg_user"
- prepare_chroot "$copydir" "$USER_HOME" "$repack"
+ prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir"
if arch-nspawn "$copydir" \
--bind="$PWD:/startdir" \