[aur-general] pacman 4.1 (makepkg 4.1) bazaar pkgver autobump problem

Gary van der Merwe garyvdm at gmail.com
Thu Apr 4 09:47:29 EDT 2013


On Thu 04 Apr 2013 15:41:27 SAST, Alucryd wrote:
> On Thu, 2013-04-04 at 15:26 +0200, Gary van der Merwe wrote:
>> Hi all.
>>
>> I'm the one wrote the Bazaar makepkg support, so any bugs are my fault.
>>
>>
>> On 04/04/2013 10:24, Stefan Husmann wrote:
>>> ==> Retrieving sources...
>>>     -> Branching http://bzr.savannah.gnu.org/r/emacs/xwidget
>>> ...
>>> bzr: ERROR: No such file:
>>> u'/home/haawda/paketierung/maintained_by_me/emacs-xwidget-bzr/4.1/xwidget/.bzr':
>>> [Errno 20]
>>> Not a directory:
>>> '/home/haawda/paketierung/maintained_by_me/emacs-xwidget-bzr/4.1/xwidget/.bzr'
>>>
>>> ==> ERROR: Failure while branching
>>> http://bzr.savannah.gnu.org/r/emacs/xwidget
>>>       Aborting...
>>
>> This error has happened before pkgver is reached, and so the problem is
>> not with your pkgver function.
>>
>> I'm busy running makepkg on your PKGBUILD to see if I reproduce the error.
>>
>>   > pkgver() {
>>   >    bzr version-info $srcdir/$_bzrmod | awk '/revno:/ {print $2}'
>>   > }
>>
>> An easier way to do this is by using bzr version-info's built in
>> templating:
>>
>> pkgver() {
>>      bzr version-info $srcdir/$_bzrmod --custom --template="{revno}\n"
>> }
>>
>> (see `bzr help version-info` for a list of fields you can use)
>>
>>
>>
>> On 04/04/2013 15:04, Alucryd wrote:
>>> FYI, I've settled with this for my bzr PKGBUILDs [1]. Only problem
>>> is, this works well when first installing the package (even the
>>> pkgver bump) and the repo has not been pulled yet, but it fails at
>>> any subsequent attempt, throwing this:
>>>
>>> ==> Making package: pantheon-notify-bzr 24-1 (Thu Apr 4 14:30:31
>>> CEST  2013)
>>> ==> Checking runtime dependencies...
>>   > ==> Checking buildtime dependencies...
>>   > ==> Retrieving sources...
>>   > ==> ERROR: /home/alucryd/Downloads/pantheon-notify is not a branch
>>   > of https://code.launchpad.net/~tombeckmann/pantheon-notify/trunk
>>> Aborting...
>>>
>>> Makepkg uses 'bzr config parent_location' to determine the upstream
>>> url, which, in this case is
>>> http://bazaar.launchpad.net/~tombeckmann/pantheon-notify/trunk/ and
>>> not the url in my source array. I'm not sure this qualifies as a bug,
>>> but you have to make sure the upstream url is the one reported by
>>> that command. I have prepared a small patch for makepkg to print the
>>> correct url, I'll open a bug later today and see if the patch can be
>>> merged.
>>
>> Just a note on why the url you have provided and the url stored in the
>> bzr config are different is because launchpad will return a http
>> permanent redirect.
>>
>> My recommendation would be to use the url it redirects to.
>>
>> However, I agree that this solution is not the greatest. One thing it
>> stops you from doing is using bzr's directory service urls (e.g. lp:)
>> So I look forward to your patch.
>>
>> Regards,
>>
>> Gary
>
> Hi Gary,
>
> Thx for adding support for bzr! I was writing the bug report when I saw
> your mail, it'll probably be quicker if I just attach the git patch
> here.
> It is not much, but it makes makepkg print the correct http url, so
> people know what url they should use. It will not help with lp: urls
> though, and right now I have no idea if there's a way to associate the
> output of 'bzr config parent_location' to a lp: url. I'll try to think
> of an alternate solution.
>
> Cheers
> --
> Maxime

That sounds good.

I think the best place to send you patch is to pacman-dev
https://mailman.archlinux.org/mailman/listinfo/pacman-dev

Regards,

Gary


More information about the aur-general mailing list