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

Oliver Kraitschy okraits at arcor.de
Mon Feb 10 05:05:00 EST 2014


Hi Doug,

On Sun, Feb 09, 2014 at 06:12:50PM -0600, Doug Newgard wrote:
>
> 1. Your pkgver function doesn't work. pkgver should not be random, it
> should increase with each commit to the repo. 

I copied it from some PKGBUILD - obviously from a bad one 
What about:

echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)

This returns: 10.51b537b
Or what about this:

git log -1 --format="%cd" --date=short | sed 's|-||g'

This returns: 20140205
Or what about this combination:

git log -1 --format="%cd.g%h" --date=short | sed 's/-/./g'

This returns: 2014.02.05.g51b537b

I took these examples from the PKGBUILDs with the most votes on the AUR.

What is recommended for the pkgver function?

> 2. Don't have it depend on an old, replaced package (python3). You
> just want 'python'.

Fixed it.

> 3. Please quote paths that contain a variable like $pkgdir.

Fixed it.

> 4. You should append -git to the pkgname when you're pulling from git
> master.

Fixed it.

> 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.

Ok, i added "-git" to pkgname, now _gitname makes sense.

Thanks for your suggestions.

The updated PKGBUILD is again available at

http://www.okraits.de/upload/omodoro/PKGBUILD

Greetings,

Oliver


More information about the aur-general mailing list