Rename functions in makepkg for consistency

Add a hyphen to any function name that needs it so we are consistent across
the board.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-06-02 13:39:47 -04:00
parent 111c0f71c3
commit 214f264bd0

View file

@ -177,7 +177,7 @@ in_array() {
return 1 return 1
} }
getdownloadclient() { get_downloadclient() {
# $1 = url with valid protocol prefix # $1 = url with valid protocol prefix
local url=$1 local url=$1
local proto=$(echo $netfile | sed 's|://.*||') local proto=$(echo $netfile | sed 's|://.*||')
@ -211,7 +211,7 @@ getdownloadclient() {
echo "$agent" echo "$agent"
} }
checkdeps() { check_deps() {
[ $# -gt 0 ] || return [ $# -gt 0 ] || return
pmout=$(pacman $PACMAN_OPTS -T $*) pmout=$(pacman $PACMAN_OPTS -T $*)
@ -302,16 +302,16 @@ handledeps() {
return $R_DEPS_SATISFIED return $R_DEPS_SATISFIED
} }
resolvedeps() { resolve_deps() {
local R_DEPS_SATISFIED=0 local R_DEPS_SATISFIED=0
local R_DEPS_MISSING=0 local R_DEPS_MISSING=0
deplist="$(checkdeps $*)" deplist="$(check_deps $*)"
[ "$deplist" = "" ] && return $R_DEPS_SATISFIED [ "$deplist" = "" ] && return $R_DEPS_SATISFIED
if handledeps $deplist; then if handledeps $deplist; then
# check deps again to make sure they were resolved # check deps again to make sure they were resolved
deplist="$(checkdeps $*)" deplist="$(check_deps $*)"
[ "$deplist" = "" ] && return $R_DEPS_SATISFIED [ "$deplist" = "" ] && return $R_DEPS_SATISFIED
elif [ "$DEP_BIN" = "1" -o "$DEP_SRC" = "1" ]; then elif [ "$DEP_BIN" = "1" -o "$DEP_SRC" = "1" ]; then
error "$(gettext "Failed to install all missing dependencies.")" error "$(gettext "Failed to install all missing dependencies.")"
@ -327,7 +327,7 @@ resolvedeps() {
} }
# fix flyspray bug #5923 # fix flyspray bug #5923
removedeps() { remove_deps() {
[ "$RMDEPS" = "0" ] && return [ "$RMDEPS" = "0" ] && return
# runtimedeps and buildtimedeps are set when resolving deps # runtimedeps and buildtimedeps are set when resolving deps
@ -365,7 +365,7 @@ download_sources() {
fi fi
# find the client we should use for this URL # find the client we should use for this URL
local dlclient=$(getdownloadclient $netfile) || exit $? local dlclient=$(get_downloadclient $netfile) || exit $?
msg2 "$(gettext "Downloading %s")" "$file" msg2 "$(gettext "Downloading %s")" "$file"
# fix flyspray bug #3289 # fix flyspray bug #3289
@ -590,7 +590,7 @@ run_build() {
if [ $ret -gt 0 ]; then if [ $ret -gt 0 ]; then
error "$(gettext "Build Failed. Aborting...")" error "$(gettext "Build Failed. Aborting...")"
removedeps remove_deps
exit 2 # $E_BUILD_FAILED # TODO: error code exit 2 # $E_BUILD_FAILED # TODO: error code
fi fi
} }
@ -828,7 +828,7 @@ create_srcpackage() {
fi fi
} }
installpackage() { install_package() {
[ "$INSTALL" = "0" ] && return [ "$INSTALL" = "0" ] && return
msg "$(gettext "Installing package with pacman -U...")" msg "$(gettext "Installing package with pacman -U...")"
@ -1128,7 +1128,7 @@ if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" \
-a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" ]; then -a "$FORCE" = "0" -a "$GENINTEG" = "0" -a "$SOURCEONLY" = "0" ]; then
if [ "$INSTALL" = "1" ]; then if [ "$INSTALL" = "1" ]; then
warning "$(gettext "a package has already been built, installing existing package.")" warning "$(gettext "a package has already been built, installing existing package.")"
installpackage install_package
exit $? exit $?
else else
error "$(gettext "a package has already been built. (use -f to overwrite)")" error "$(gettext "a package has already been built. (use -f to overwrite)")"
@ -1178,22 +1178,22 @@ if [ "$NODEPS" = "1" -o "$GENINTEG" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1"
# skip printing a warning message for the others: geninteg, nobuild, repkg # skip printing a warning message for the others: geninteg, nobuild, repkg
elif [ $(type -p pacman) ]; then elif [ $(type -p pacman) ]; then
deperr=0 deperr=0
# these two variables are needed later by removedeps # these two variables are needed later by remove_deps
unset runtimedeps buildtimedeps unset runtimedeps buildtimedeps
msg "$(gettext "Checking Runtime Dependencies...")" msg "$(gettext "Checking Runtime Dependencies...")"
resolvedeps ${depends[@]} resolve_deps ${depends[@]}
ret=$? ret=$?
# deplist is a global variable set by resolvedeps # deplist is a global variable set by resolve_deps
runtimedeps="$deplist" runtimedeps="$deplist"
if [ "$ret" != "0" ]; then if [ "$ret" != "0" ]; then
deperr=1 deperr=1
fi fi
msg "$(gettext "Checking Buildtime Dependencies...")" msg "$(gettext "Checking Buildtime Dependencies...")"
resolvedeps ${makedepends[@]} resolve_deps ${makedepends[@]}
ret=$? ret=$?
# deplist is a global variable set by resolvedeps # deplist is a global variable set by resolve_deps
buildtimedeps="$deplist" buildtimedeps="$deplist"
if [ "$ret" != "0" ]; then if [ "$ret" != "0" ]; then
deperr=1 deperr=1
@ -1267,11 +1267,11 @@ if [ "$CLEANUP" = "1" ]; then
rm -rf ${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log* rm -rf ${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log*
fi fi
removedeps remove_deps
msg "$(gettext "Finished making: %s")" "$pkgname ($(date))" msg "$(gettext "Finished making: %s")" "$pkgname ($(date))"
installpackage install_package
exit 0 #E_OK exit 0 #E_OK