I am using the pacman's latest master branch, when I run 'makepkg -R' to repackage packages, it will run pkgver() and prepare(), if there are some patch command in prepare(), it will fail. should pkgver() and prepare() run when repackage? This problem may be introduced by this commit: https://projects.archlinux.org/pacman.git/commit/?id=8454daa7feef14b660561f2... An ugly working patch is: diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 753621b..57302a0 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2207,12 +2207,12 @@ elif (( !REPKG )); then extract_sources fi -if (( PKGVERFUNC )); then +if (( PKGVERFUNC && !REPKG )); then update_pkgver basever=$(get_full_version) check_build_status fi -if (( PREPAREFUNC )); then +if (( PREPAREFUNC && !REPKG )); then run_prepare fi