[aur-general] Code review request: new PKGBUILD "omodoro"

David Phillips dbphillipsnz at gmail.com
Mon Feb 10 00:52:06 EST 2014


Right, that makes sense. In that case, I'll just switch it back to
using static source tarballs.

Thanks for your help.

On 10/02/2014, Anatol Pomozov <anatol.pomozov at gmail.com> wrote:
> Hi
>
> On Sun, Feb 9, 2014 at 9:08 PM, David Phillips <dbphillipsnz at gmail.com>
> wrote:
>> Related to (4): I've got a PKGBUILD
>> (https://aur.archlinux.org/packages/pa/passgen/PKGBUILD) which points
>> to a git repo, but *not* using a "git://xyz.git" url. Instead, I'm
>> using the format
>> "https://github.com/phillid/passgen/archive/master.zip" - should this
>> package have -git appended?
>
> Yes, it should. The "-git" suffix indicates that the package is built
> from VCS. "master.zip" source file *also* comes from VCS, from git
> repo and means "current HEAD of master branch". The main point of VCS
> package is that the source is moving target and it changes
> independently from package maintainer. And it differs from 'versioned'
> package where sources are changed only when maintainer updates
> PKGBUILD.
>
> Using "master.zip" is a bad idea because:
>  - Once master.zip downloaded it is cached in the local directory. If
> you run makepkg again nothing will be redownloaded even if upstream
> repository has changed.
>  - Updating local git repository is more effective as it fetches only
> the latest changes. Thus package rebuild is faster.
>
>
> So what you want for passgen:
>  - rename it to passgen-git
>  - use git repository for sources=() instead of 'master.zip'
>  - add 'git' to makedepends
>  - add proper pkgver()
>  - use 'SKIP' for sha1sum as project head can change at any moment
>
>
>> I'm thinking it doesn't need the -git
>> suffix because it's pulled over HTTP and doesn't need git... What's
>> the convention on this?
>>
>> Cheers.
>>
>> On 10/02/2014, Doug Newgard <scimmia22 at outlook.com> wrote:
>>> ----------------------------------------
>>>> Date: Mon, 10 Feb 2014 00:15:55 +0100
>>>> From: okraits at arcor.de
>>>> To: aur-general at archlinux.org
>>>> Subject: [aur-general] Code review request: new PKGBUILD "omodoro"
>>>>
>>>> Hello trusty Arch people,
>>>>
>>>> i just created my first PKGBUILD for the little python script "omodoro"
>>>> i wrote. It would be nice if you guys could do a code review to approve
>>>> the PKGBUILD i wrote for the AUR.
>>>>
>>>> The PKGBUILD is here:
>>>>
>>>> http://www.okraits.de/upload/omodoro/PKGBUILD
>>>>
>>>> Any feedback/criticism is appreciated!
>>>>
>>>> Greetings,
>>>>
>>>> Oliver
>>>
>>> 1. Your pkgver function doesn't work. pkgver should not be random, it
>>> should
>>> increase with each commit to the repo.
>>> 2. Don't have it depend on an old, replaced package (python3). You just
>>> want
>>> 'python'.
>>> 3. Please quote paths that contain a variable like $pkgdir.
>>> 4. You should append -git to the pkgname when you're pulling from git
>>> master.
>>> 5. Why bother to define _gitname if it's the same as pkgname? Since you
>>> should be changing pkgname, _gitname can make sense or you can just do
>>> ${pkgname%-git} and get the same thing without having to use an extra
>>> variable.
>>>
>>> Those are my suggestions, nothing too serious.
>>
>>
>> --
>> David Phillips
>


-- 
David Phillips


More information about the aur-general mailing list