pmbootstrap-meow/pmb/parse
Newbyte 71ac87e6af
pmb.parse._apkbuild: Fix subpackages with set arch but no custom function (MR 2267)
If there are multiple sections to a subpackage declaration, the middle one
(item 1 in the sequence in this case) is the custom function name which we
should use instead of the deduced one.

For example:
  $pkgname-something-separate:something_separate:noarch

Here, the subpackage is called $pkgname-something-separate, but function names
cannot contain hyphens, so it's instead given the custom name
something_separate where the hyphen is replaced by an underscore. At the end,
the architecture of the subpackage is also overriden as noarch instead of
whatever architecture the main package has.

However, it is also possible to only override architecture of a subpackage and
not the function name.

In such cases, we get this:
  $pkgname-something::noarch

We still have a "middle section" (item 1 in the sequence), but it will be
empty. As such, we not only need to check whether there are more than 1
subpackage part, but also whether that extra subpackage part is an empty string
or not.

This fixes an issue where pmbootstrap would not end up just setting the
properties of subpackages with a set arch but no custom function as
None instead of giving them proper depends, install, pkgdesc, et cetera
properties.
2024-02-26 20:55:49 +01:00
..
__init__.py parse/init: allow importing arguments_install and arguments_flasher 2023-11-01 20:40:11 +01:00
_apkbuild.py pmb.parse._apkbuild: Fix subpackages with set arch but no custom function (MR 2267) 2024-02-26 20:55:49 +01:00
apkindex.py pmb.helpers.pmaports.get: deal with operators 2023-11-29 22:31:11 +01:00
arch.py pmb.parse.arch: add armv8l -> armv7 mapping (MR 2259) 2024-02-22 19:47:32 +01:00
arguments.py pmb.parse.arguments: Check for argcomplete in sys.modules instead (MR 2258) 2024-02-16 10:04:24 +01:00
binfmt_info.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
bootimg.py parse.bootimg: Separate kernel and ramdisk MediaTek headers 2023-11-13 09:30:24 +01:00
cpuinfo.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
depends.py parse.depends: consider selected providers when resolving providers 2023-11-26 11:01:35 +01:00
deviceinfo.py deviceinfo: make parse_kernel_suffix private 2023-07-21 08:54:10 +02:00
kconfig.py kconfig check: Add USB gadget check to community 2023-05-02 08:38:04 +02:00
version.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00