[pacman-dev] Bazaar branch check in makepkg

David Macek david.macek.0 at gmail.com
Thu Jan 8 22:18:20 UTC 2015


Hi all.

I'm posting this on behalf of an MSYS2 user. We'd like to hear your opinion on removing this check from makepkg, which has been causing some troubles apparently.

The patch: https://raw.githubusercontent.com/renatosilva/MSYS2-packages/e006c48770281be1c952f2063ce0d5ccc4585d86/pacman/0003-Fix-Bazaar-cloning-support-in-makepkg.patch

His comment:

There was some manual check to know if the existing repository is actually a clone of the branch specified in $source. However this check needs to be semantic, not a simple string comparison. For example, I was blocked from building a PKGBUILD which uses a Bazaar repository in $source, 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). It is also 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 $source (which is what this buggy check tries to tell), next step which is a pull operation will fail anyway.

I'm not sure why this kind of code is used but it looks pretty useless for any VCS at all. Maybe they wanted to avoid that non-clones successfully pulled from $source (for example if the non-clone simply just lacks some commits), but isn't this a corner case? Anyway, upstream may be interested in removing these checks for all VCS systems.

-- 
David Macek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4234 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20150108/ca284f9e/attachment.bin>


More information about the pacman-dev mailing list