From 12da94c924cb29dd83c4bbf6fd50d1d1fc660312 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Jun 2013 15:12:59 -0600 Subject: use common.sh:get_full_version() universally --- src/fullpkg/fullpkg-build | 12 ------------ src/fullpkg/fullpkg-find | 17 ++--------------- 2 files changed, 2 insertions(+), 27 deletions(-) (limited to 'src/fullpkg') diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index cbaea91..20e8c88 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -25,18 +25,6 @@ list_pkgs() { } } -# 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 - -} - ## Check all build_dir, fails if one PKGBUILD is nonfree check_nonfree() { find "$build_dir" -name PKGBUILD \ diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index dbe65df..72a6585 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -11,18 +11,6 @@ guess_repo() { basename $(dirname $(pwd)) } -# 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 - -} - copy_files() { local copydir="$build_dir/${pkgbase:-${pkgname[0]}}" @@ -60,7 +48,6 @@ find_deps() { local repo="${repo:-$(guess_repo)}" local pkgbase="${pkgbase:-${pkgname[0]}}" - local fullver="$(get_fullver ${epoch:-0} ${pkgver} ${pkgrel})" if ! pkgbuild-check-nonfree > /dev/null 2> /dev/null; then if [ "$?" -eq 15 ]; then @@ -73,7 +60,7 @@ find_deps() { # be always considered outdated: there is no package built named kdebase. # TODO: maybe check for the package requested in case of recursive calls, # instead of the first one listed? - if is_built "${pkgname[0]}" "${fullver}"; then + if is_built "${pkgname[0]}" "$(get_full_version "${pkgname[0]}")"; then exit 0 # pkg is built and updated fi @@ -91,7 +78,7 @@ find_deps() { fi # current package plus a space for every level - msg2 "%${LEVEL}s${pkgbase}-${fullver}" + msg2 "%${LEVEL}s${pkgbase}-$(get_full_version)" ## Check next levels declare -i next_level=$LEVEL+1 -- cgit v1.2.2