Properly ignore comments at the end of lines, instead of assuming that all lines below belong to the attribute: subpackages="$pkgname-dev" # $pkgname-lang Fixes build.postmarketos.org#61, where pmbootstrap would assume that a random package provides "make", just because the word "make" is written somewhere below subpackages=" in the APKBUILD and it is parsed incorrectly. While at it, also support the ' character for quotations and detect if a quotation for a value was started, but there is no end quotation sign in the rest of the file. I've added tests, and manually checked that this did not introduce any parsing bugs for all the APKBUILDs in pmaports.git, by running 'pmbootstrap apkbuild_parse' with the old and new code, and diffing the result. |
||
---|---|---|
.. | ||
aportgen | ||
build | ||
chroot | ||
config | ||
data | ||
export | ||
flasher | ||
helpers | ||
install | ||
parse | ||
qemu | ||
__init__.py |