1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

treewide: migrate to pkgrepo API (MR 2252)

Make use of the new pmb.core.pkgrepo API to handle multiple aports and
extra-repos.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-08 05:59:45 +02:00 committed by Oliver Smith
parent 8a61d67053
commit 560cea46ea
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
19 changed files with 153 additions and 91 deletions

View file

@ -5,6 +5,7 @@ from pathlib import Path
from typing import Dict
from pmb.core import get_context
from pmb.core.context import Context
from pmb.core.pkgrepo import pkgrepo_path
from pmb.helpers import logging
import os
from pathlib import Path
@ -23,9 +24,9 @@ def get_path(name_repo: str):
:returns: full path to repository
"""
if name_repo == "pmaports":
return get_context().config.aports
return get_context().config.work / "cache_git" / name_repo
if name_repo == "aports_upstream":
return get_context().config.work / "cache_git" / name_repo
return pkgrepo_path(name_repo)
def clone(name_repo):