summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-02-12 00:59:28 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2022-02-12 01:09:45 -0500
commit5c1fbfbcdcec9e5277492fcfeb4244d7e29e488d (patch)
tree19cd4dba88248b4b121584ce34c8a3ddcb713dd7
parent6c90e302211c6f54ded110ba8e8e87e085e9bdf3 (diff)
squash! allow user-configured existing local mirror and abslibrewip-2022-02-11
-rw-r--r--parabola_repolint/repocache.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/parabola_repolint/repocache.py b/parabola_repolint/repocache.py
index b7be5be..6fdc9e1 100644
--- a/parabola_repolint/repocache.py
+++ b/parabola_repolint/repocache.py
@@ -672,11 +672,7 @@ class Repo():
self._pkgbuild_dir = os.path.join(RepoCache.ABSLIBRE_DIR, name) if have_abs_tree else None
self._pkgentries_dir = os.path.join(RepoCache.PKGENTRIES_DIR, name)
self._pkgfiles_dir = os.path.join(RepoCache.PKGFILES_DIR, name)
-
-
- print("Repo() self._pkgbuild_dir=%s joined=%s" % (self._pkgbuild_dir , os.path.join(self._pkgbuild_dir, '.pkgbuilds')))
- print("Repo() self._pkgfiles_dir=%s joined=%s" % (self._pkgfiles_dir , os.path.join(self._pkgfiles_dir, '.pkgfiles')))
-
+ self._mirror_dir = os.path.join(RepoCache.MIRROR_DIR, name)
self._pkgbuilds = []
self._pkgbuild_cache = {}
@@ -770,7 +766,7 @@ class Repo():
def _load_pkgentries(self):
''' extract and then load the entries in the db.tar.xz '''
- arches_dir = os.path.join(self._pkgfiles_dir, 'os')
+ arches_dir = os.path.join(self._mirror_dir, 'os')
for arch in os.scandir(arches_dir):
if arch.name not in CONFIG.parabola.arches:
continue
@@ -828,7 +824,7 @@ class Repo():
def _load_pkgfiles(self):
''' load the pkg.tar.xz files from the repo '''
i = 0
- arches_dir = os.path.join(self._pkgfiles_dir, 'os')
+ arches_dir = os.path.join(self._mirror_dir, 'os')
for arch in os.scandir(arches_dir):
if arch.name not in CONFIG.parabola.arches:
continue
@@ -870,13 +866,13 @@ class RepoCache():
raise FileNotFoundError("directory not found: '%s' (CONFIG.local.abslibre)" % CONFIG.local.abslibre)
if CONFIG.local.mirror:
if os.path.exists(CONFIG.local.mirror):
- PKGFILES_DIR = CONFIG.local.mirror
+ MIRROR_DIR = CONFIG.local.mirror
PKGMETA_DIR = os.path.join(CACHE_DIR, 'pkgmeta')
os.makedirs(PKGMETA_DIR, exist_ok=True)
else:
raise FileNotFoundError("directory not found: '%s' (CONFIG.local.mirror)" % CONFIG.local.mirror)
else:
- PKGMETA_DIR = ''
+ MIRROR_DIR = PKGFILES_DIR
def __init__(self):