[pacman-dev] makepkg bug with epoch code
Have not had time to look into this, but I get this error with the kernel26 PKGBUILD in Arch Linux [core] repo:
makepkg -gc ==> Retrieving Sources... -> Found linux-2.6.37.tar.bz2 -> Found patch-2.6.37-4-ARCH.bz2 -> Found config -> Found config.x86_64 -> Found kernel26.preset ==> Generating checksums for source files...
md5sums=('c8ee37b4fdccdb651e0603d35350b434' '732176aeb134678b4e369e1d5d5fca2e' 'cc49d27766f55df22f9cb78228880e78' '8f8059fa252e2f81b31be0c1bdbef123' '25584700a0a679542929c4bed31433b6') ==> Cleaning up... /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37") Allan
On Wed, Feb 09, 2011 at 08:52:55PM +1000, Allan McRae wrote:
Have not had time to look into this, but I get this error with the kernel26 PKGBUILD in Arch Linux [core] repo:
makepkg -gc ==> Retrieving Sources... -> Found linux-2.6.37.tar.bz2 -> Found patch-2.6.37-4-ARCH.bz2 -> Found config -> Found config.x86_64 -> Found kernel26.preset ==> Generating checksums for source files...
md5sums=('c8ee37b4fdccdb651e0603d35350b434' '732176aeb134678b4e369e1d5d5fca2e' 'cc49d27766f55df22f9cb78228880e78' '8f8059fa252e2f81b31be0c1bdbef123' '25584700a0a679542929c4bed31433b6') ==> Cleaning up... /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37")
Allan
epoch has its default initializer called on line 1862, but if -g is specified, we're exiting (invoking clean_up where this happens) on line 1858 before this ever occurs. A simple fix would just be to move the epoch initialization to right before the GENINTEG block on line 1852. dave
When generating integrity sums, we could get some weird output before due to epoch being uninitialized: /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37") Signed-off-by: Dan McGee <dan@archlinux.org> --- scripts/makepkg.sh.in | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 001178a..16dc0b8 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1850,6 +1850,10 @@ else source "$BUILDFILE" fi +# set defaults if they weren't specified in buildfile +pkgbase=${pkgbase:-${pkgname[0]}} +epoch=${epoch:-0} + if (( GENINTEG )); then mkdir -p "$srcdir" chmod a-s "$srcdir" @@ -1859,9 +1863,6 @@ if (( GENINTEG )); then exit 0 # $E_OK fi -pkgbase=${pkgbase:-${pkgname[0]}} -epoch=${epoch:-0} - # check the PKGBUILD for some basic requirements check_sanity || exit 1 -- 1.7.4
On 09/02/11 23:56, Dan McGee wrote:
When generating integrity sums, we could get some weird output before due to epoch being uninitialized:
/usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37")
Signed-off-by: Dan McGee<dan@archlinux.org>
Signed-off-by: Allan
participants (3)
-
Allan McRae
-
Dan McGee
-
Dave Reisner