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.
To access variables like
$pkgname
or$pkgbase
from thePKGBUILD
, parts of it are extracted bygrep
and then executed usingeval
. When one of the extracted lines contains a hash (#
), every following line will be regarded as a comment byeval
and thus be discarded. This prevents correct function with some packages, for examplelinux
, orlinux-headers
, generated from the kernelPKGBUILD
.Removing the comments before evaluation fixes this.