[pacman-dev] [PATCHES] Refreshed PKGBUILDs

Allan McRae mcrae_allan at hotmail.com
Sat May 17 10:40:41 EDT 2008


Geoffroy Carrier wrote:
> Hi!
>
> See patches as attachments. Globally cosmetic changes.
>
>   

It is much better to put patches inline so we can comment on them directly.


> Assumptions:
>   - $startdir should be used as $srcdir and $pkgdir parent, as it could
>     be useful, for example, to have $pkgdir in a 
>   tmpfs
>     => Removed any reference to "$startdir/pkg" or "$startdir/src"
>     => Relative paths to switch between $srcdir and $pkgdir should be
> avoided. E.g.:
>        cd $srcdir/A
>        patch [...] < ../../pkg/
>        is non-sense
>   

I must be missing something here...  where exactly are you changing 
$srcdir or $pkgdir not to point at $startdir/src and $startdir/pkg? You 
can have these directories as tmpfs if you really want but how does that 
need this change?   I also like the use of $startdir/* because it is 
quite obvious what the startdir is.


>   - $pkgdir and $srcdir could contain namespaces, etc. and we shouldn't
>     try to guess about $IFS
>     => "$srcdir/A" instead of $srcdir/A (use of "")
>   

Quoting paths with variable names seems a good idea. 

>   - Still, lightweight means smater
>     => Don't use
>       "$_svntrunk" ${something}
>        instead of
>       $_svntrunk $something
>   

Where exactly is this change?

>   - "folder" is prefered to "folder/" in our scripts, but we should not
>     suppose a makefile doesn't use something like 
>   "${DESTDIR}usr/bin"
>     => DESTDIR="$pkgdir/", "$pkgdir" otherwise
>
>   

It would be a poorly formed makefile if it did this, but I have struck 
this once problem before.  It is also readily noticeable when building 
the package so I'm not sure if this is really needed.

Allan






More information about the pacman-dev mailing list