blob: bfa97fed7e458f21433c0ed49739509c7152347a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"""Subroutines with repositories"""
from os import path
import portage
rsets = portage.db[portage.root]['vartree'].settings.repositories
def portage_repos():
for repo in rsets.prepos_order:
yield repo
def portage_repo_path(repo):
"""Get the path of a given portage repository"""
if repo in rsets.prepos_order:
return rsets.prepos[repo].location
return None
def pomu_status(repo_path):
"""Check if pomu is enabled for a repository at a given path"""
return path.isdir(path.join(repo_path, 'metadata', 'pomu'))
|