ava1ar / customizepkg

A tool for Arch Linux package manager pacman to modify PKGBUILD automatically
GNU General Public License v3.0
49 stars 14 forks source link

support comments in PKGBUILDs #9

Closed dffischer closed 10 years ago

dffischer commented 10 years ago

To access variables like $pkgname or $pkgbase from the PKGBUILD, parts of it are extracted by grep and then executed using eval. When one of the extracted lines contains a hash (#), every following line will be regarded as a comment by eval and thus be discarded. This prevents correct function with some packages, for example linux, or linux-headers, generated from the kernel PKGBUILD.

Removing the comments before evaluation fixes this.

stevenhoneyman commented 10 years ago

I'm glad you changed the grep|sed :+1: Merged, thanks!

dffischer commented 10 years ago

Thanks for the quick reply. This could likely be the fastest pull request I ever issued.

ava1ar commented 10 years ago

Useful pull requests are always welcome here ;)