[aur-dev] Bugs FS#2649,FS#12645: variable substitution revisited

Gergely Imreh imrehg at gmail.com
Wed Jan 21 22:10:15 EST 2009


Hi,

  Attached a patch to do a more complete variable substitution (not
just pkgver and pkgname). Also, since it seems that some of official
packages like to use "eval" for multiple-replacement, let's handle
that in the same time.
  Checked functionality with these packages: core/kernel26 (arbitrary
simple substitution), extra/firefox-i18n (eval).
  This patch should also close bugs FS#2649 and FS#12645.

  There are some quirky bash variable substitution types that this
cannot handle but those usually fall into  the "not well formed
package" category. E.g. when there's a simple variable with quotes but
with extra spaces inside the quotes, like _myvar=("something "). Then
if there's, say, a substitution source=(from/$_myvar/code.tar.gz),
bash will give: "from/something". If there's no extra space, it will
give "from/something/code.tar.gz" For properly doing this on AUR, the
way quotation marks are removed has to be changed. But probably we
don't need to do that, until some uses this bash "feature" in an
official package (since I recently learned, that the definition of the
PKGBUILD format is just one line: "whatever makepkg can handle".)

  Cheers,
         Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FS-2649-FS-12645-subsititution-of-all-variables.patch
Type: application/octet-stream
Size: 2359 bytes
Desc: not available
URL: <http://www.archlinux.org/pipermail/aur-dev/attachments/20090122/d4b6a3f4/attachment.obj>


More information about the aur-dev mailing list