On 5 October 2010 12:22, Sergej Pupykin <ml@sergej.pp.ru> wrote:
On 05.10.2010 01:04, Ray Rashif wrote:
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
Most of "invalid number" issues already fixed in svn by something like: LC_NUMERIC=C provides=("perl-datetime=`printf %.4f $pkgver`") or provides=("perl-datetime=`LC_NUMERIC=C printf %.4f $pkgver`")
./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')
"package not found" error does not prevent source package building and can be ignored. Probably I should replace it with:
_ghcver=`pacman -Q ghc 2>/dev/null | cut -d\ -f 2 | cut -f 1 -d -`
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.
It is easier to use automatic version checking.
OK, thanks for attending to those!