[aur-general] [community] PKGBUILDs incompatible with sourcing

Ray Rashif schiv at archlinux.org
Mon Oct 4 17:04:02 EDT 2010


I'm not filing (a) bug(s) for these since there's no harm done, but
this should serve as a reminder to everyone that we should check our
buildscripts for sourcing compatibility whenever possible, for the
sake of clarity and consistency. The currently affected PKGBUILDs are
as follows:

./community/perl-datetime/PKGBUILD
bash: printf: 0,61: invalid number

./community/perl-parse-recdescent/PKGBUILD
bash: printf: 1,965001: invalid number

./community/haskell-x11/PKGBUILD
error: package "ghc" not found

./community/haskell-x11-xft/PKGBUILD
error: package "ghc" not found

For the perl packages:

provides=("perl-datetime=`printf %.4f ${pkgver/./,} | sed 's#,#.#'`")

I don't know what the intention is with ${pkgver/./,} | sed 's#,#.#'
but it does not work, as it's replacing "." with "," and then back to
".", but printf naturally fails to deal with the decimal being
replaced by a comma. If I understood this correctly, the line should
read:

provides=("perl-datetime=$(printf "%.4f %s\n" ${pkgver})")

For the other two:

_ghcver=`pacman -Q ghc | cut -d\  -f 2 | cut -f 1 -d -`
depends=("ghc=${_ghcver}" 'libx11')

Again, I don't know why go through the trouble of checking a local
package that may not exist on all systems (Sergej?). Better "hardcode"
the numbers and be done with it.


More information about the aur-general mailing list