index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-05-22 10:44:26 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-05-28 11:28:30 +1000 |
commit | a00615bfdad628299352b94e0f44d211a758fd17 (patch) | |
tree | 6ac7380ccbdbfd0dfc64493e2d025952df133e6e /scripts/makepkg.sh.in | |
parent | 5caf45cdbb267ee45c7b4a9c815e500efd350e6e (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 32 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4d9948ec..f5285a0d 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -354,15 +354,6 @@ error_function() { exit $E_USER_FUNCTION_FAILED } -source_safe() { - shopt -u extglob - if ! source "$@"; then - error "$(gettext "Failed to source %s")" "$1" - exit $E_MISSING_FILE - fi - shopt -s extglob -} - merge_arch_attrs() { local attr supported_attrs=( provides conflicts depends replaces optdepends @@ -1112,28 +1103,7 @@ trap 'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"' E # preserve environment variables to override makepkg.conf restore_envvars=$(declare -p PKGDEST SRCDEST SRCPKGDEST LOGDEST BUILDDIR PKGEXT SRCEXT GPGKEY PACKAGER CARCH 2>/dev/null || true) -# default config is makepkg.conf -MAKEPKG_CONF=${MAKEPKG_CONF:-$confdir/makepkg.conf} - -# Source the config file; fail if it is not found -if [[ -r $MAKEPKG_CONF ]]; then - source_safe "$MAKEPKG_CONF" -else - error "$(gettext "%s not found.")" "$MAKEPKG_CONF" - plain "$(gettext "Aborting...")" - exit $E_CONFIG_ERROR -fi - -# Source user-specific makepkg.conf overrides, but only if no override config -# file was specified -XDG_PACMAN_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/pacman" -if [[ "$MAKEPKG_CONF" = "$confdir/makepkg.conf" ]]; then - if [[ -r "$XDG_PACMAN_DIR/makepkg.conf" ]]; then - source_safe "$XDG_PACMAN_DIR/makepkg.conf" - elif [[ -r "$HOME/.makepkg.conf" ]]; then - source_safe "$HOME/.makepkg.conf" - fi -fi +source_makepkg_config eval "$restore_envvars" |