Skip to content
Snippets Groups Projects

core: pkgrepo: support arbitrarily named pmaports directories

Merged Caleb Connolly requested to merge caleb/custom-pmaports into master
+ 2
2
@@ -50,7 +50,7 @@ def pkgrepo_name(path: Path) -> str:
MUST be used instead of "path.name" as we need special handling
for the pmaports repository.
"""
if path == pkgrepo_paths()[-1]:
if path == get_context().config.aports[-1]:
return "pmaports"
return path.name
@@ -62,7 +62,7 @@ def pkgrepo_path(name: str) -> Path:
"""
# The pmaports repo is always last, and we hardcode the name.
if name == "pmaports":
return pkgrepo_paths()[-1]
return get_context().config.aports[-1]
for aports in pkgrepo_paths():
if aports.name == name:
Loading