From bd974c260223bd65e2af5a013f9c16f84119b8d7 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 22 Jan 2021 20:32:35 -0500 Subject: housekeeping --- src/chroot-tools/libremakepkg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 80d7444..93f5dfc 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -261,8 +261,7 @@ main() { fi else if [[ ! -f PKGBUILD ]]; then - # This is the message used by makepkg - error "PKGBUILD does not exist." + error "No PKGBUILD exists in the present directory." exit $EXIT_FAILURE fi fi @@ -302,17 +301,18 @@ main() { msg 'Using existing source package %s' "$srcpkg" # TODO: symlink $srcpkg to ${SRCPKGDEST}/${pkgbase}-${evr}-${CARCH}${SRCEXT} else - msg 'Downloading sources...' - local srcpkgdest - srcpkgdest="$(mktemp -d)" + local srcpkgdest="$(mktemp -d)" chown "$LIBREUSER:" "$srcpkgdest" trap "rm -rf -- ${srcpkgdest@Q}" EXIT + + msg 'Downloading sources...' SRCPKGDEST="$srcpkgdest" download_sources "$copydir" "$LIBREUSER" |& indent srcpkg=("$srcpkgdest"/*) if (( ${#srcpkg[@]} != 1 )); then error 'Something went funny with makepkg --allsource' return $EXIT_FAILURE fi + # We want to inject "-$pkgarch" in to srcpkg's filename, right before $SRCEXT local srcext pkgarch srcpkg_filename srcext="$(MAKEPKG_CONF=$copydir/etc/makepkg.conf get_var makepkg SRCEXT)" -- cgit v1.2.2