From dcced6d4c63d6e620dacb0f24c9f69bc7453d0d8 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Thu, 7 Jun 2018 11:50:14 +0200 Subject: various fixes --- src/shared/feedback.sh | 2 +- src/shared/package.sh | 3 +++ src/stage1/stage1.sh | 2 +- src/stage3/makepkg.sh | 2 +- src/stage4/makepkg.sh | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shared/feedback.sh b/src/shared/feedback.sh index 4239002..9582ad8 100644 --- a/src/shared/feedback.sh +++ b/src/shared/feedback.sh @@ -29,7 +29,7 @@ export ERROR_KEYFAIL=5 notify() { if type -p notify-send >/dev/null; then machinectl -q shell --uid="$SUDO_USER" .host \ - "$(which notify-send)" "$@" >/dev/null + "$(command -v notify-send)" "$@" >/dev/null fi } diff --git a/src/shared/package.sh b/src/shared/package.sh index 2a1a822..45ff408 100644 --- a/src/shared/package.sh +++ b/src/shared/package.sh @@ -146,6 +146,9 @@ package_patch() { pkgbase=$(srcinfo_pkgbase) || return pkgname=$(srcinfo_pkgname) || return + # temporary workaround for broken perl packages with makepkg-5.1 + [ -n "$pkgbase" ] || pkgbase="$pkgname" + echo -n "checking for package patch ... " local patch="$SRCDIR/patches/$CARCH/$pkgbase$p.$pkgname".patch [ -f "$patch" ] || patch="$SRCDIR/patches/$CARCH/$pkgbase$p".patch diff --git a/src/stage1/stage1.sh b/src/stage1/stage1.sh index 6629f5b..517344f 100755 --- a/src/stage1/stage1.sh +++ b/src/stage1/stage1.sh @@ -49,7 +49,7 @@ check_cross_toolchain() { stage1_makepkg() { # produce pkgfiles - for f in "$SRCDIR"/toolchain-pkgbuilds/$1/*.in; do + for f in "$SRCDIR/toolchain-pkgbuilds/$1"/*.in; do sed "s#@CHOST@#$CHOST#g; \ s#@CARCH@#$CARCH#g; \ s#@PLATFORM_CFLAGS@#${PLATFORM_CFLAGS[*]}#g; \ diff --git a/src/stage3/makepkg.sh b/src/stage3/makepkg.sh index 8cd1bf6..841119b 100644 --- a/src/stage3/makepkg.sh +++ b/src/stage3/makepkg.sh @@ -51,7 +51,7 @@ EOF check_repo "$PKGDEST" native || make_repo "$PKGDEST" native # patch libremakepkg to update config.sub/config.guess - cat "$(which libremakepkg)" > "$BUILDDIR/libremakepkg.sh" + cat "$(command -v libremakepkg)" > "$BUILDDIR/libremakepkg.sh" chmod +x "$BUILDDIR/libremakepkg.sh" if [ "x${REGEN_CONFIG_FRAGMENTS:-no}" == "xyes" ]; then diff --git a/src/stage4/makepkg.sh b/src/stage4/makepkg.sh index 4109941..602c238 100644 --- a/src/stage4/makepkg.sh +++ b/src/stage4/makepkg.sh @@ -67,7 +67,7 @@ EOF done # patch libremakepkg to update config.sub/config.guess - cat "$(which libremakepkg)" > "$BUILDDIR/libremakepkg.sh" + cat "$(command -v libremakepkg)" > "$BUILDDIR/libremakepkg.sh" chmod +x "$BUILDDIR/libremakepkg.sh" if [ "x${REGEN_CONFIG_FRAGMENTS:-no}" == "xyes" ]; then -- cgit v1.2.2