FS#23307 - [makepkg] unexpected EOF error when parenthesis are used in optdepends description
Attached to Project:
Pacman
Opened by Eric Belanger (Snowman) - Thursday, 17 March 2011, 05:42 GMT
Last edited by Dan McGee (toofishes) - Sunday, 20 March 2011, 16:59 GMT
Opened by Eric Belanger (Snowman) - Thursday, 17 March 2011, 05:42 GMT
Last edited by Dan McGee (toofishes) - Sunday, 20 March 2011, 16:59 GMT
|
Details
Summary and Info:
When parenthesis are part of the descriptions accompanying the optdepends, makepkg throws an unexpected EOF error. This error happens with pacman 3.5.0-1 in testing. The pacman from core isn't affected. To reproduce: PKGBUILD: ======== pkgname=foo pkgver=1 pkgrel=1 pkgdesc="" arch=('i686' 'x86_64') url="" license=('GPL') optdepends=('vdpau-video: VDPAU backend for VA API (for GPU acceleration on Nvidia cards)' 'libpulse: PulseAudio support') source=() md5sums=() package_() { cd "${srcdir}" true } ============== makepkg output: ============== $ makepkg -f /usr/bin/makepkg: eval: line 1279: unexpected EOF while looking for matching `)' ==> Making package: foo 1-1 (Thu Mar 17 01:24:44 EDT 2011) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving Sources... ==> Extracting Sources... ==> Removing existing pkg/ directory... ==> Entering fakeroot environment... /usr/bin/makepkg: eval: line 1279: unexpected EOF while looking for matching `)' ==> Creating package... -> Generating .PKGINFO file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: foo 1-1 (Thu Mar 17 01:24:45 EDT 2011) ======================= Note that if vdpau-video is the last item in the arrary there is no error message. The metainfo in .PKGINFO doens't seem to be affected, at least with this test case. |
This task depends upon
Closed by Dan McGee (toofishes)
Sunday, 20 March 2011, 16:59 GMT
Reason for closing: Fixed
Additional comments about closing: Commit b6cada3eed82
Sunday, 20 March 2011, 16:59 GMT
Reason for closing: Fixed
Additional comments about closing: Commit b6cada3eed82
The regex assumes that the final line of the optdepends array ends with a ")" or a ")" followed by a bash comment, both with possible whitespace. That should be quite robust...
test (0.8 KiB)