From 9fb35767dc99e07fb825c03787add5f11bae9a10 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 11 Jun 2013 20:27:00 -0600 Subject: libremakepkg: improve behavior when PACKAGER is not set --- src/chroot-tools/libremakepkg | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index cf2d880..f7391ee 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -180,8 +180,10 @@ chroot_init() { MAKEPKG_CONF="$copydir/etc/makepkg.conf" set_conf_makepkg PKGDEST /pkgdest MAKEPKG_CONF="$copydir/etc/makepkg.conf" set_conf_makepkg SRCDEST /srcdest - local PACKAGER="$(get_conf_makepkg PACKAGER .)" - MAKEPKG_CONF="$copydir/etc/makepkg.conf" set_conf_makepkg PACKAGER "$PACKAGER" + local PACKAGER="$(get_conf_makepkg PACKAGER '')" + if [[ -n $PACKAGER ]]; then + MAKEPKG_CONF="$copydir/etc/makepkg.conf" set_conf_makepkg PACKAGER "$PACKAGER" + fi unset PACKAGER if ! grep -q '^\[repo\]' "$copydir/etc/pacman.conf"; then @@ -274,7 +276,8 @@ usage() { echo 'configuration changes in the chroot:' echo ' - whatever changes `librechroot` makes.' echo ' - set `PKGDEST` and `SRCDEST` in `/etc/makepkg.conf`' - echo ' - set `PACKAGER` in `/etc/makepkg.conf`' + echo ' - set `PACKAGER` in `/etc/makepkg.conf` to reflect the value' + echo ' outside of the chroot.' echo ' - (maybe) delete `/build/.makepkg.conf`' echo ' - (maybe) delete `/build/.ssh/config`' echo 'If run from inside of a chroot, this command will:' -- cgit v1.2.2