pkgbuild.py: fix subpackages being swallowed

This commit is contained in:
InsanePrawn 2022-08-08 23:52:55 +02:00
parent 06b8536915
commit 6a7a0d6d17

View file

@ -81,9 +81,8 @@ def parse_pkgbuild(relative_pkg_dir: str, native_chroot: Chroot) -> list[Pkgbuil
multi_pkgs = True multi_pkgs = True
elif line.startswith('pkgname'): elif line.startswith('pkgname'):
if multi_pkgs: if multi_pkgs:
if current is not base_package:
base_package.subpackages.append(current)
current = deepcopy(base_package) current = deepcopy(base_package)
base_package.subpackages.append(current)
current.name = splits[1] current.name = splits[1]
elif line.startswith('pkgver'): elif line.startswith('pkgver'):
current.pkgver = splits[1] current.pkgver = splits[1]