Skip to content
Snippets Groups Projects
Unverified Commit c7a7fee9 authored by Oliver Smith's avatar Oliver Smith
Browse files

pmb.helpers.pmaports.get_repo: "systemd" or None (MR 2405)

This function is used by "pmbootstrap repo_missing", which is only used
by bpo. In order to support building the split repository in bpo, this
patch is required.

Return "systemd" for the packages that are in extra-repos/systemd, and
None for all other packages (indicating that they don't get split into a
separate repository).

Checking the parent-parent dir of the APKBUILD is a bit fragile
(assuming we don't have subdirs in the systemd repository), but that
assumption was made with the previous implementation as well (would only
return "systemd" in that case). I don't see a better solution with
reasonable effort right now, given that we also support multiple
pmaports dirs. We can improve this in the future, meanwhile let's just
not use subdirs in the systemd repository.
parent 61a9bdc8
No related branches found
No related tags found
No related merge requests found
......@@ -275,12 +275,16 @@ def get_repo(pkgname) -> str | None:
"""Get the repository folder of an aport.
:pkgname: package name
:returns: a string like "main", "device", "cross", ...
or None when the aport could not be found
:returns: * None if pkgname is not in extra-repos/
* "systemd" if the pkgname is in extra-repos/systemd/
"""
aport: Path
aport = find(pkgname)
return aport.parent.name
if aport.parent.parent.name == "extra-repos":
return aport.parent.name
return None
def check_arches(arches, arch: Arch):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment