summaryrefslogtreecommitdiff
path: root/src/treepkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/treepkg')
-rwxr-xr-xsrc/treepkg17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/treepkg b/src/treepkg
index 795faea..10bebcf 100755
--- a/src/treepkg
+++ b/src/treepkg
@@ -37,25 +37,13 @@ trap 'trap_exit "TERM signal caught. Exiting..."' TERM HUP QUIT
trap 'trap_exit "Aborted by user! Exiting..."' INT
trap 'trap_exit "An unknown error has occurred. Exiting..."' ERR
-# return : full version spec, including epoch (if necessary), pkgver, pkgrel
-# usage : get_fullver( ${epoch:-0}, $pkgver, $pkgrel )
-get_fullver() {
- if [ $1 -eq 0 ]; then
- # zero epoch case, don't include it in version
- echo $2-$3
- else
- echo $1:$2-$3
- fi
-
-}
-
# Add line to build order cache in CSV format
# *must* be run from the PKGBUILD path
# status;depth;pkgbase;[epoch:]pkgver-pkgrel;path;repo
# $1 status
# $2 pkgname
add_order() {
- echo "${1};${DEPTH};${2:-${pkgbase}};${fullver};${PWD};$(guess_repo "$PWD")" >> "${BUILDORDER}"
+ echo "${1};${DEPTH};${2:-${pkgbase}};$(get_full_version ${2});${PWD};$(guess_repo "$PWD")" >> "${BUILDORDER}"
${VERBOSE} && msg2 "%${DEPTH}s${2:-${pkgbase}} [${1}]" || true
}
@@ -113,7 +101,6 @@ done
# Get useful values
pkgbase="${pkgbase:-${pkgname[0]}}"
-fullver=$(get_fullver ${epoch:-0} ${pkgver} ${pkgrel})
# Get or set the work dir
BUILDDIR="${1:-$(mktemp -d /tmp/${pkgbase}-treepkg-XXXx)}"
@@ -138,7 +125,7 @@ if ! ${BUILDNOW}; then
# If this package is already built quit silently
for _pkg in "${pkgname[@]}"; do
- if is_built "${_pkg}" "${fullver}"; then
+ if is_built "${_pkg}" "$(get_full_version ${_pkg})"; then
add_order "ignore"
exit 0
fi