[aur-general] Perl PKGBUILD review

François Freitag mail at franek.fr
Mon Dec 4 07:11:01 UTC 2017


Hi Eli,

Thank you very much for the feedback!

> On 2017-12-03 10:47 AM, Eli Schwartz via aur-general wrote> 
>
> Versioned peer dependencies are wrong, we only use versioned 
> dependencies in exceptional cases e.g. gcc and gcc-libs are tightly 
> bound to identical $pkgver-$pkgrel releases.

I added 'perl>=5.10.0' to the deps because
https://wiki.archlinux.org/index.php/Perl_Policy#Vendor_installation
recommends:

A depends on perl (>= 5.10.0) is required in order ensure that the
module is correctly installed into the new @INC path.

IIUC, perl directory hierarchy in Arch before perl 5.10 shared the site
and vendor directories, resulting in conflicts for users. Did I miss
something?

> Why did you remove the check() function? Does it not work anymore?

There are no tests for pgbadger, running `make test` in the source
directory results in:
No tests defined for pgBadger extension.

Removing the check function makes the absence of tests clearer IMHO.

> You do not need to remove perllocal.pod and .packlist, as that is 
> already done by the default purge option in makepkg.conf -- 
> admittedly it can be removed from the PKGBUILD since the defaults 
> should work.

The purge does not seem to be working as I expect: when I build the
PKGBUILD (with the purge option enabled), the package contains an empty
directory:

$ namcap pgbadger-9.2-5-any.pkg.tar.xz
pgbadger W: Directory (usr/lib/perl5/5.26/vendor_perl/auto/pgBadger) is
empty

I'm using the default OPTIONS in /etc/makepkg.conf:
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng
!upx !debug)  # purge is active

When I look at the state of the pkg directory after the build()
function, the only content of
${pkgdir}/usr/lib/perl5/5.26/vendor_perl/auto/pgBadger is a .packlist.

After the makepkg command completes, the .packlist is removed from
${pkgdir}, leaving an empty directory. I expected it to be removed by
the !emptydirs option.
Based on makepkg's output, I see that empty directories are stripped
before the purge.

...
  -> Removing empty directories...
  -> Removing libtool files...
  -> Purging unwanted files...
...


Maybe that's why the directory is not removed? If that's correct, is
there a better alternative than the `find` command to remove unwanted files?

> [...] you should switch that to use:
> source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
>
> Thereby giving the download filename a unique name specific to this> package. I use ${url} by habit, you don't have to though.

I like the ${url} trick, it avoids verifying the url twice for users.

Thanks again for the help!
François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20171203/362c9624/attachment.asc>


More information about the aur-general mailing list