summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Silva <br.renatosilva@gmail.com>2015-01-15 19:47:07 -0200
committerAllan McRae <allan@archlinux.org>2015-02-14 11:18:20 +1000
commit0927206fc4be98f3afee2622156db8f99e96a316 (patch)
tree7f41f324e06ab43d43fdfabdd625052763f87d63
parentba869597fb64f1101012df4b0d834ed5eced0b7c (diff)
downloadpacman-0927206fc4be98f3afee2622156db8f99e96a316.tar.xz
Fix Bazaar cloning in makepkg.
There was some manual check to know if the local repository was really a clone of the one specified in PKGBUILD. This check has been removed because it is buggy and not necessary. It is buggy because this check needs to be semantic, not a simple string comparison. For example, I was blocked from building a PKGBUILD because Bazaar was returning two different strings for the same location (for HTTP one was url-encoded while the other was not, and for local paths one was absolute while the other was relative). While this may be a bug in Bazaar, the check is unreliable since the comparison is not semantic (http://foo.com/%2Bplus and http://foo.com/+plus obviously refer to the same location for example). Specially, it is useless because the intention is updating the existing local clone. However, if the local clone is not a real clone of the repository specified in PKGBUILD (which was what this buggy check tried to tell), next step which is a pull operation will fail anyway. This is because bzr pull does not perform merges, it just makes one branch into a mirror of another. There was a reason provided when this manual check was added for Git, but no reason provided for copying such check when Bazaar support was added, see commits below. In fact, Mercurial lacks such manual check. * c926c39b0481ec3db931fff1f86db0c49d78976b * 3b02f80dcb3159a7ab0c673d5eae971ad7504e7f Fixes FS#43448. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in17
1 files changed, 0 insertions, 17 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 4461d12f..9d4ce552 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -471,23 +471,6 @@ download_bzr() {
exit 1
fi
elif (( ! HOLDVER )); then
- # Make sure we are fetching the right repo
- local distant_url="$(bzr info $url 2> /dev/null | sed -n '/branch root/{s/ branch root: //p;q;}')"
- local local_url="$(bzr config parent_location -d $dir)"
- if [[ -n $distant_url ]]; then
- if [[ $distant_url != "$local_url" ]]; then
- error "$(gettext "%s is not a branch of %s")" "$dir" "$url"
- plain "$(gettext "Aborting...")"
- exit 1
- fi
- else
- if [[ $url != "$local_url" ]] ; then
- error "$(gettext "%s is not a branch of %s")" "$dir" "$url"
- error "$(gettext "The local URL is %s")" "$local_url"
- plain "$(gettext "Aborting...")"
- exit 1
- fi
- fi
msg2 "$(gettext "Pulling %s ...")" "${displaylocation}"
cd_safe "$dir"
if ! bzr pull "$url"; then