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

Maxime GAUDUIN alucryd at gmail.com
Thu Apr 4 14:34:48 EDT 2013


On Thu, Apr 4, 2013 at 8:07 PM, Stefan Husmann
<stefan-husmann at t-online.de>wrote:

> Am 04.04.2013 16:06, schrieb Alucryd:
>
>  On Thu, 2013-04-04 at 09:52 -0400, Daniel Wallace wrote:
>>
>>> Gary van der Merwe <garyvdm at gmail.com> wrote:
>>>
>>>  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<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<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 <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/<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<https://mailman.archlinux.org/mailman/listinfo/pacman-dev>
>>>>
>>>> Regards,
>>>>
>>>> Gary
>>>>
>>>
>>> It is
>>>
>>> https://wiki.archlinux.org/**index.php/Super_Quick_Git_**Guide<https://wiki.archlinux.org/index.php/Super_Quick_Git_Guide>
>>> --
>>> Sent from my Android Phone.
>>> Daniel Wallace
>>> Arch Linux Trusted User
>>> GTManfred
>>>
>>
>> Thx, I have sent the patch to pacman-dev.
>>
>> Cheers
>> --
>> Maxime
>>
>>
>>
>>  Thanks for all the persons answering to my mail.
>
> So far, I applied your patch, and my pkgver function now is
>
>
> pkgver() {
>   bzr version-info $srcdir/$_bzrmod --custom --template="{revno}\n"
> }
>
> My problem still seems to be the one Martti figured out: The sources are
> downloaded to $startdir/$_bzrmod, not to $srcdir/$_bzrmod.
>
> If I fake this by creating a symlink
>
> ln -s src/xwidget xwidget
>
> and run makepkg, I get
>
> [haawda at frege 4.1]$ makepkg
> ==> Making package: emacs-xwidget-bzr 101273-1 (Thu Apr  4 19:58:58
>
> CEST 2013)
> ==> Checking runtime dependencies...
> ==> Checking buildtime dependencies...
> ==> Retrieving sources...
> ==> ERROR: /home/haawda/paketierung/**maintained_by_me/emacs-**xwidget-bzr/4.1/xwidget
> is not a branch of http://bzr.savannah.gnu.org/r/**emacs/xwidget<http://bzr.savannah.gnu.org/r/emacs/xwidget>
> ==> ERROR: The reported url is http://bzr.savannah.gnu.org/r/**
> emacs/xwidget/ <http://bzr.savannah.gnu.org/r/emacs/xwidget/>
>     Aborting...
>
> Maybe it is because there is no bzr+ in front of the reported url?
>
> Best Regards Stefan
>
>
About that second error, my guess is you're missing a "/" at the end of
your url, it has to match the reported url to the "letter".
I can't say about the $startdir thing however, I have a $SRCDEST set in
makepkg.conf, and every source (including the repos) are downloaded inside
it. Can you try setting one?

Cheers.
-- 
Maxime


More information about the aur-general mailing list