mikkeloscar / gopkgbuild

A golang package for parsing Arch Linux PKGBUILDs
GNU General Public License v3.0
22 stars 5 forks source link

Remove checks for predetermined archs #12

Closed Morganamilo closed 6 years ago

Morganamilo commented 6 years ago

Remove checks for predetermined archs

Now any arch is considered valid. lexer now gets a pointer to the in progress pkgbuild it is constructing. When checking for arch dependant variables such as depends_x86_64 the lexer will check against the archs that the specific SRCINFO supports, instead of a predetermined list. This means a PKGBUILD that only supports x86_64 should error if it contains depends_armv7h.

Note this will cause a failiue if depends_x86_64 comes before arch in a SRCINFO but makepkg will never generate it this way so I'm considering that case invalid.

Add test for teamviewer package

Teamviewer was picked because it has a lot of arch dependant variables eg source_x86_64

fixes #11

mikkeloscar commented 6 years ago

Closed in favor of #13