You are not logged in.

#1 2014-04-02 15:39:28

Zygote
Member
Registered: 2013-01-15
Posts: 77

[SOLVED] Best practice on updating git-sourced packages?

So quick question. Im maintaining an AUR package that grabs sources from git. How should I update the package? Will the package be automatically updated when the git repo has new commits, or do I have to manually increment the pkgrel variable in the PKGBUILD or is there something else I should be doing?

Cheers!

Last edited by Zygote (2014-04-03 07:04:44)

Offline

#2 2014-04-02 16:12:28

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [SOLVED] Best practice on updating git-sourced packages?

I think that's something I forgot to mention in your other thread -- write a pkgver function to update the PKGBUILD's pkgver. The wiki link I posted in that thread (about VCS PKGBUILD standards) has the details.

Regardless, when you run makepkg against a (correctly written) PKGBUILD, it pulls in the upstram changes and builds against them.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2014-04-02 16:50:33

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Best practice on updating git-sourced packages?

Zygote wrote:

Im maintaining an AUR package that grabs sources from git. How should I update the package?

As a maintainer, you shouldn't "update" anything. As long as the PKGBUILD file successfully builds the package then it's good!

Will the package be automatically updated when the git repo has new commits

No, it will not. There is nothing automatic about the AUR.

do I have to manually increment the pkgrel variable in the PKGBUILD or is there something else I should be doing?

Updating a package that relies on git is the responsibility of the end user.

As an end user, it's my responsibility to read the project's commit messages and mailing lists and bug reports, decide that the software is stable, and when I have enough time, run "makepkg" (or an AUR helper) to create a fresh new package based on the latest source code from the git repository.

Offline

#4 2014-04-02 16:59:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] Best practice on updating git-sourced packages?

The only thing to add to the above is that the AUR package name should have -git appended to the name.  This makes it clear to users what they are getting and that it is up to them to make the choices mentioned above.  Apparently some AUR helpers even use these -git -dev type package names to rebuild everything for you with the right flags.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2014-04-03 06:33:37

Zygote
Member
Registered: 2013-01-15
Posts: 77

Re: [SOLVED] Best practice on updating git-sourced packages?

Thanks for all the input! Ive added a pkgver function and hopefully things are working well.

Offline

#6 2014-04-03 06:51:41

Zygote
Member
Registered: 2013-01-15
Posts: 77

Re: [SOLVED] Best practice on updating git-sourced packages?

Quick question. When is the pkgver run exactly? Currently, the package on AUR shows r40.6657d43. However, the source on github is currently at r42. Should I update the package on the AUR every now and then to reflect this or should I just leave it?

Offline

#7 2014-04-03 06:54:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Best practice on updating git-sourced packages?

Just leave it: it will be updated whenever someone downloads it and runs makepkg.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2014-04-03 06:57:00

Zygote
Member
Registered: 2013-01-15
Posts: 77

Re: [SOLVED] Best practice on updating git-sourced packages?

jasonwryan wrote:

Just leave it: it will be updated whenever someone downloads it and runs makepkg.

Ah really? Thats awesome! Thanks!

Offline

#9 2014-04-03 07:02:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Best practice on updating git-sourced packages?

No problem. Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB