libmakepkg: fix missing or inaccurate interdependencies
When the executable checking was refactored into libmakepkg, it carried with it, usage of $E_* error codes, which need to be declared from error.sh but are only available when the parent program already sources error.sh; additionally, message.sh was only loaded in a parent library, but not where it was needed, and option.sh was often loaded when it wasn't needed at all. util.sh, meanwhile, has always depended on message.sh functions. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b93dfa935f
commit
614ef781eb
13 changed files with 14 additions and 14 deletions
|
@ -22,11 +22,6 @@
|
||||||
[[ -n "$LIBMAKEPKG_BUILDENV_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_BUILDENV_SH" ]] && return
|
||||||
LIBMAKEPKG_BUILDENV_SH=1
|
LIBMAKEPKG_BUILDENV_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
|
||||||
|
|
||||||
|
|
||||||
declare -a buildenv_functions build_options
|
declare -a buildenv_functions build_options
|
||||||
|
|
||||||
for lib in "$LIBRARY/buildenv/"*.sh; do
|
for lib in "$LIBRARY/buildenv/"*.sh; do
|
||||||
|
|
|
@ -21,11 +21,6 @@
|
||||||
[[ -n "$LIBMAKEPKG_EXECUTABLE_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_EXECUTABLE_SH" ]] && return
|
||||||
LIBMAKEPKG_EXECUTABLE_SH=1
|
LIBMAKEPKG_EXECUTABLE_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
|
||||||
|
|
||||||
source "$LIBRARY/util/message.sh"
|
|
||||||
|
|
||||||
|
|
||||||
declare -a executable_functions
|
declare -a executable_functions
|
||||||
|
|
||||||
for lib in "$LIBRARY/executable/"*.sh; do
|
for lib in "$LIBRARY/executable/"*.sh; do
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_CCACHE_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_ccache')
|
executable_functions+=('executable_ccache')
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_CHECKSUM_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_checksum')
|
executable_functions+=('executable_checksum')
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_DISTCC_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_distcc')
|
executable_functions+=('executable_distcc')
|
||||||
|
|
|
@ -23,7 +23,7 @@ LIBMAKEPKG_EXECUTABLE_FAKEROOT_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_fakeroot')
|
executable_functions+=('executable_fakeroot')
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_GPG_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_gpg')
|
executable_functions+=('executable_gpg')
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_GZIP_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_gzip')
|
executable_functions+=('executable_gzip')
|
||||||
|
|
|
@ -23,7 +23,7 @@ LIBMAKEPKG_EXECUTABLE_PACMAN_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_pacman')
|
executable_functions+=('executable_pacman')
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ LIBMAKEPKG_EXECUTABLE_STRIP_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/option.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_strip')
|
executable_functions+=('executable_strip')
|
||||||
|
|
|
@ -23,7 +23,7 @@ LIBMAKEPKG_EXECUTABLE_SUDO_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_sudo')
|
executable_functions+=('executable_sudo')
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@ LIBMAKEPKG_EXECUTABLE_VCS_SH=1
|
||||||
|
|
||||||
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
source "$LIBRARY/util/option.sh"
|
source "$LIBRARY/util/error.sh"
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
executable_functions+=('executable_vcs')
|
executable_functions+=('executable_vcs')
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
[[ -n "$LIBMAKEPKG_UTIL_UTIL_SH" ]] && return
|
[[ -n "$LIBMAKEPKG_UTIL_UTIL_SH" ]] && return
|
||||||
LIBMAKEPKG_UTIL_UTIL_SH=1
|
LIBMAKEPKG_UTIL_UTIL_SH=1
|
||||||
|
|
||||||
|
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
|
||||||
|
|
||||||
|
source "$LIBRARY/util/message.sh"
|
||||||
|
|
||||||
##
|
##
|
||||||
# usage : in_array( $needle, $haystack )
|
# usage : in_array( $needle, $haystack )
|
||||||
|
|
Loading…
Add table
Reference in a new issue