index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2014-06-29 17:13:42 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-06-29 17:15:23 +1000 |
commit | 7305768d5436823999eff382de6bc6334f4e66a4 (patch) | |
tree | de399915d4032b0cce5794d5fbe8af589bdbfaec /scripts/makepkg.sh.in | |
parent | e0a7682607256ef24b5d2d58212c4b958cce0dce (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index e20b7072..779ebcbf 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -824,6 +824,7 @@ update_pkgver() { fi @SEDINPLACE@ "s:^pkgrel=[^ ]*:pkgrel=1:" "$BUILDFILE" source_safe "$BUILDFILE" + epoch=${epoch:-0} local fullver=$(get_full_version) msg "$(gettext "Updated version: %s")" "$pkgbase $fullver" else @@ -846,10 +847,10 @@ missing_source_file() { ## get_full_version() { if [[ -z $1 ]]; then - if [[ $epoch ]] && (( ! $epoch )); then - printf "%s\n" "$pkgver-$pkgrel" - else + if [[ -n $epoch ]] && (( $epoch )); then printf "%s\n" "$epoch:$pkgver-$pkgrel" + else + printf "%s\n" "$pkgver-$pkgrel" fi else for i in pkgver pkgrel epoch; do @@ -857,10 +858,10 @@ get_full_version() { eval $(declare -f package_$1 | sed -n "s/\(^[[:space:]]*$i=\)/${i}_override=/p") [[ -z ${!indirect} ]] && eval ${indirect}=\"${!i}\" done - if (( ! $epoch_override )); then - printf "%s\n" "$pkgver_override-$pkgrel_override" - else + if [[ -n $epoch_override ]] && (( $epoch_override )); then printf "%s\n" "$epoch_override:$pkgver_override-$pkgrel_override" + else + printf "%s\n" "$pkgver_override-$pkgrel_override" fi fi } |