diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/chroot-tools/libremakepkg | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index f2dc537..1db9f08 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -212,6 +212,15 @@ main() { fi unset chroot + # Load makepkg configuration ########################################### + # Note that all of these are globals + PKGDEST="$(get_var makepkg PKGDEST "$PWD")" + SRCDEST="$(get_var makepkg SRCDEST "$PWD")" + SRCPKGDEST="$(get_var makepkg SRCPKGDEST "$PWD")" + LOGDEST="$(get_var makepkg LOGDEST "$PWD")" + MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" + PACKAGER="$(get_var makepkg PACKAGER '')" + # Quick sanity check ################################################### if (( EUID )); then @@ -225,22 +234,8 @@ main() { exit 1 fi - # Load makepkg configuration ########################################### - # Note that all of these are globals - PKGDEST="$(get_var makepkg PKGDEST "$PWD")" - SRCDEST="$(get_var makepkg SRCDEST "$PWD")" - SRCPKGDEST="$(get_var makepkg SRCPKGDEST "$PWD")" - LOGDEST="$(get_var makepkg LOGDEST "$PWD")" + # Make sure that the various *DEST directories exist mkdir -p -- "$PKGDEST" "$SRCDEST" "$SRCPKGDEST" "$LOGDEST" - MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')" - PACKAGER="$(get_var makepkg PACKAGER '')" - - librechroot_flags+=( - -r "$PWD:/startdir_host" - -r "$SRCDEST:/srcdest_host" - -n "$CHROOT" - -l "$copy" - ) # OK, we are starting now ############################################## @@ -248,6 +243,13 @@ main() { lock 9 "/build/.lock" \ "Waiting for existing lock on build directory to be released" else + librechroot_flags+=( + -r "$PWD:/startdir_host" + -r "$SRCDEST:/srcdest_host" + -n "$CHROOT" + -l "$copy" + ) + # Obtain a lock on the chroot lock 9 "$copydir.lock" \ "Waiting for existing lock on chroot copy to be released: [%s]" "$copy" |