diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-29 00:45:43 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-29 00:45:43 -0600 |
commit | 7034eed1f7ceec379b34f8dd782fb986c7165ad4 (patch) | |
tree | f27909fc75724e6e9ab0115055b9dd17a0624cec /db-functions | |
parent | d744cae51bf5ea3e8c01d70ddbec564ad66b036c (diff) |
use the get_full_version from libremessages (actually, common.sh)
It works properly when split packages have different versions.
Diffstat (limited to 'db-functions')
-rw-r--r-- | db-functions | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/db-functions b/db-functions index dabb22b..f5e2b3d 100644 --- a/db-functions +++ b/db-functions @@ -19,27 +19,13 @@ restore_umask () { WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX") LOCKS=() -# Used: plain, msg, msg2, warning, error, in_array -# Overwritten: get_full_version, -# cleanup, abort, die +# Used: plain, msg, msg2, warning, error, in_array, get_full_version +# Overwritten: cleanup, abort, die # Ignored: stat_busy, stat_done, # setup_workdir, trab_abort, trap_exit, # lock, slock, lock_close . $(librelib common) -## -# usage : get_full_version( $epoch, $pkgver, $pkgrel ) -# return : full version spec, including epoch (if necessary), pkgver, pkgrel -## -get_full_version() { - if [[ $1 -eq 0 ]]; then - # zero epoch case, don't include it in version - echo $2-$3 - else - echo $1:$2-$3 - fi -} - script_lock() { local LOCKDIR="$TMPDIR/.scriptlock.${0##*/}" if ! mkdir "$LOCKDIR" >/dev/null 2>&1 ; then @@ -301,7 +287,7 @@ check_pkgxbs() { in_array "${repo}" ${PKGREPOS[@]} || return 1 - local xbsver="$(. "`xbs releasepath ${_pkgbase} ${repo} ${_pkgarch}`/PKGBUILD"; echo $(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}) )" + local xbsver="$(. "`xbs releasepath ${_pkgbase} ${repo} ${_pkgarch}`/PKGBUILD"; get_full_version "${_pkgname}")" [ "${xbsver}" == "${_pkgver}" ] || return 1 local xbsnames=($(. "`xbs releasepath ${_pkgbase} ${repo} ${_pkgarch}`/PKGBUILD"; echo ${pkgname[@]})) |