pmbootstrap/pmb/parse
Minecrell 0e27713512
pmb.parse._apkbuild: Extend APKBUILD parser to work for subpackages (!1866)
At the moment we have a simple subpkgdesc() function that can only
parse "pkgdesc" from subpackages, without support for any variables.
But we have a quite nice variable parser now that can be extended
to work for subpackages.

Simply put this works by:
  - Finding the lines that belong to the subpackage function
  - Stripping indentation (tab)
  - Parsing relevant attributes similar to the apkbuild() function

The "subpackages" in the parsed APKBUILD are replaced by a dict
of subpkgname: {"pkgdesc": "...", "depends": "..."} which are
parsed from the subpackage function (if found).
This makes it possible to get the "depends" of a subpackage.
2020-02-19 14:56:57 +03:00
..
__init__.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
_apkbuild.py pmb.parse._apkbuild: Extend APKBUILD parser to work for subpackages (!1866) 2020-02-19 14:56:57 +03:00
apkindex.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
arch.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
arguments.py aportupgrade command for upgrading APKBUILDs (!1752) 2020-02-15 20:24:09 +01:00
binfmt_info.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
bootimg.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
depends.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
deviceinfo.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
kconfig.py Change copyright to 2020 2020-01-06 02:43:00 +01:00
version.py Change copyright to 2020 2020-01-06 02:43:00 +01:00