On 03/08/14 01:54, Dave Reisner wrote:
Break apart each of the blocks into their own separate functions. And, instead of the hand crafted eval statements, reuse the logic from pkgbuild-introspection[0] to abstract away the complexities of parsing bash.
This commit fixes at least 3 bugs in check_sanity, and one other:
Can you clarify these bugs for me?
1) The wrong variable is shown for the error which would be thrown when, e.g. pkgname=('foopkg' 'bar@pkg')
What error? This pkgname actually works here...
2) The "arch" variable is not sanity checked when the PKGBUILD has package_$pkgname() instead of package().
Do you mean with an override in package_$pkgname()?
3) Avoid linting pkgrel/epoch in package functions (because we don't actually support these overrides).
As said in my previous mail, I vote to get rid of overriding pkg{ver,rel} and epoch.
4) The "arch" variable is leaked when processing arch overrides in packages. For example:
pkgname=(foo libfoo) arch=('i686' 'x86_64') ....
package_foo() { arch=('any') : }
package_libfoo() { : }
This leaks arch=('any') into package_libfoo. Reversing the order of pkgname will mask this bug.
Huh? This works for me: foo-1-1-any.pkg.tar.xz libfoo-1-1-x86_64.pkg.tar.xz Allan