forked from Mirror/pmbootstrap
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:
parent
8a61d67053
commit
560cea46ea
19 changed files with 153 additions and 91 deletions
|
@ -2,6 +2,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import os
|
||||
import glob
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
from pmb.helpers import logging
|
||||
|
||||
import pmb.config
|
||||
|
@ -25,7 +26,7 @@ def list_chroot(suffix: Chroot, remove_prefix=True):
|
|||
def list_aports():
|
||||
ret = []
|
||||
prefix = pmb.config.initfs_hook_prefix
|
||||
for path in glob.glob(f"{get_context().config.aports}/*/{prefix}*"):
|
||||
for path in pkgrepo_iglob(f"*/{prefix}*"):
|
||||
ret.append(os.path.basename(path)[len(prefix):])
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue