Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Monaco <matthew.monaco@0x01b.net>2012-03-12 19:14:19 -0600
committerDan McGee <dan@archlinux.org>2012-04-07 11:26:00 -0500
commit80a811ec9641ae0a94a6dcee3dbaeb42afb27afc (patch)
treeaf606e3f14e20048699e1a3e693cf2f3e7257740
parent6310bb5fbe841c4957dddce6a8ee97f2c6a10fc5 (diff)
makepkg: devel_check(): determine vcs
Rather than prioritizing an arbitrary VCS, collect all development directives. If there is more than one, give a warning and abort.
-rw-r--r--scripts/makepkg.sh.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 4b67414d..5e023537 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1721,6 +1721,22 @@ devel_check() {
# calls to makepkg via fakeroot will explicitly pass the version
# number to avoid having to determine the version number twice.
# Also do a check to make sure we have the VCS tool available.
+ local vcs=()
+
+ [[ -n ${_darcstrunk} && -n ${_darcsmod} ]] && vcs+=("darcs")
+ [[ -n ${_cvsroot} && -n ${_cvsmod} ]] && vcs+=("cvs")
+ [[ -n ${_gitroot} && -n ${_gitname} ]] && vcs+=("git")
+ [[ -n ${_svntrunk} && -n ${_svnmod} ]] && vcs+=("svn")
+ [[ -n ${_bzrtrunk} && -n ${_bzrmod} ]] && vcs+=("bzr")
+ [[ -n ${_hgroot} && -n ${_hgrepo} ]] && vcs+=("hg")
+
+ if (( ${#vcs[@]} == 0 )); then
+ return
+ elif (( ${#vcs[@]} > 1 )); then
+ warning "$(gettext "Ambiguous VCS package. Cannot pick from: %s.")" "${vcs[*]}"
+ return 0
+ fi
+
if [[ -n ${_darcstrunk} && -n ${_darcsmod} ]] ; then
if ! type -p darcs >/dev/null; then
warning "$(gettext "Cannot find the %s binary required to determine latest %s revision.")" "darcs" "darcs"