FS#23524 - [makepkg] presence of backslash in optdepends array produce error

Attached to Project: Pacman
Opened by Eric Belanger (Snowman) - Wednesday, 30 March 2011, 23:57 GMT
Last edited by Dan McGee (toofishes) - Saturday, 09 April 2011, 22:22 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.1
Due in Version 3.5.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If you have backslash in the optdepends array to escape the newline like so:

optdepends=('ghostscript: for Ghostscript support' \
'openexr: for OpenEXR support' \
'libwmf: for WMF support' \
'librsvg: for SVG support' \
'libxml2: for XML support' \
'jasper: for JPEG-2000 support' \
'libpng: for PNG support')

then makepkg abort with the following error:

$ makepkg
==> ERROR: Invalid syntax for optdepend : ' openexr: for OpenEXR support'
==> ERROR: Invalid syntax for optdepend : ' libwmf: for WMF support'
==> ERROR: Invalid syntax for optdepend : ' librsvg: for SVG support'
==> ERROR: Invalid syntax for optdepend : ' libxml2: for XML support'
==> ERROR: Invalid syntax for optdepend : ' jasper: for JPEG-2000 support'
==> ERROR: Invalid syntax for optdepend : ' libpng: for PNG support'

I suppose it's a parsing issue.
This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 09 April 2011, 22:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 37df0d4f4fb042f8fb
Comment by Allan McRae (Allan) - Thursday, 31 March 2011, 00:25 GMT
I can not figure out where is that extra space coming from at the start of each of those optdepends entries... Must be something to do with how the += handles the trailing backslash. This is fixed by adding:
-e 's/\\$//'
to the end of the sed expression...
Comment by Allan McRae (Allan) - Thursday, 31 March 2011, 01:12 GMT
patch

Loading...