FS#41022 - [pacman] makepkg -i fails in some cases when in PKGBUILD "epoch" is empty
Attached to Project:
Pacman
Opened by cina (cina) - Saturday, 28 June 2014, 18:29 GMT
Last edited by Allan McRae (Allan) - Monday, 04 August 2014, 04:59 GMT
Opened by cina (cina) - Saturday, 28 June 2014, 18:29 GMT
Last edited by Allan McRae (Allan) - Monday, 04 August 2014, 04:59 GMT
|
Details
Description:
Encountered when attempting to build and install https://aur.archlinux.org/packages/maperitive-bin/ with "makepkg -i" $ makepkg -i (...) ==> Creating package "maperitive-bin"... -> Generating .PKGINFO file... -> Adding install file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: maperitive-bin :20140503-1 (Sat 28 Jun 15:16:53 BST 2014) ==> Installing package maperitive-bin with pacman -U... /usr/bin/makepkg: line 849: ((: ! : syntax error: operand expected (error token is "! ") loading packages... error: '/home/cina/build/PACKAGES/maperitive-bin-:20140503-1-x86_64.pkg.tar.xz': could not find or read package ==> WARNING: Failed to install built package(s). When followed by another "makepkg -i", the package gets installed without errors. _______________________________________________________________________________________________________________ It seems that the sufficient conditions to trigger this are: in a PKGBUILD epoch='' AND pkgver='some value' AND pkgver() { output different from "$pkgver" } Additional info: * pacman 4.1.2-6 Steps to reproduce: Build and install maperitive-bin with "makepkg -i" Alternatively, since maperitive-bin pulls mono, steps to reproduce are: $ mkdir fakepkg $ cd fakepkg $ touch fakefile Save the following as PKGBUILD: ############################################## # Maintainer: Your Name <youremail@domain.com> pkgname=fakepkg pkgver=1 pkgrel=1 epoch= pkgdesc="fake description" arch=('any') url="" license=('GPL') groups=() depends=() makedepends=() checkdepends=() optdepends=() provides=() conflicts=() replaces=() backup=() options=() install= changelog= source=('fakefile') noextract=() md5sums=('SKIP') pkgver() { echo "2" } package() { install -Dm644 "$srcdir/fakefile" "$pkgdir/usr/share/fakepkg/fakefile" } ############################################## $ makepkg -i $ makepkg -i # Again $ pacman -R fakepkg |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 04 August 2014, 04:59 GMT
Reason for closing: Fixed
Additional comments about closing: git commit 7305768d
Monday, 04 August 2014, 04:59 GMT
Reason for closing: Fixed
Additional comments about closing: git commit 7305768d
Comment by Allan McRae (Allan) -
Saturday, 28 June 2014, 21:39 GMT
We should detect an empty epoch string and abort immediately.
Comment by Allan McRae (Allan) -
Sunday, 29 June 2014, 07:17 GMT
patch:
https://mailman.archlinux.org/pipermail/pacman-dev/2014-June/019161.html