aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-09-06 14:12:32 -0700
committerZac Medico <zmedico@gentoo.org>2020-09-07 18:37:42 -0700
commitc36a4ec6694b8b9e22fb63298d1588589acb1ab2 (patch)
treec9ea340b2c46aefecf8338ef2a065a003f8ccf8c /lib/_emerge
parentman/portage.5: Fix man2html rendering in repos.conf section (diff)
downloadportage-c36a4ec6694b8b9e22fb63298d1588589acb1ab2.tar.gz
portage-c36a4ec6694b8b9e22fb63298d1588589acb1ab2.tar.bz2
portage-c36a4ec6694b8b9e22fb63298d1588589acb1ab2.zip
Add binrepos.conf to replace PORTAGE_BINHOST (bug 668334)
Support /etc/portage/binrepos.conf as a replacement for the PORTAGE_BINHOST variable. Behavior is similar to repos.conf, initially supporting just the sync-uri attribute. Both binrepos.conf and PORTAGE_BINHOST can be used simultaneously, in the same way that repos.conf and PORTDIR_OVERLAY can be used simultaneously. The emerge --info output for binrepos.conf looks like this: Binary Repositories: example-binhost sync-uri: https://example.com/binhost Bug: https://bugs.gentoo.org/668334 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/actions.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index f57269817..5e8a46957 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -32,7 +32,8 @@ portage.proxy.lazyimport.lazyimport(globals(),
from portage import os
from portage import shutil
from portage import _encodings, _unicode_decode
-from portage.const import _DEPCLEAN_LIB_CHECK_DEFAULT
+from portage.binrepo.config import BinRepoConfigLoader
+from portage.const import BINREPOS_CONF_FILE, _DEPCLEAN_LIB_CHECK_DEFAULT
from portage.dbapi.dep_expand import dep_expand
from portage.dbapi._expand_new_virt import expand_new_virt
from portage.dbapi.IndexedPortdb import IndexedPortdb
@@ -1836,6 +1837,16 @@ def action_info(settings, trees, myopts, myfiles):
for repo in repos:
append(repo.info_string())
+ binrepos_conf_path = os.path.join(settings['PORTAGE_CONFIGROOT'], BINREPOS_CONF_FILE)
+ binrepos_conf = BinRepoConfigLoader((binrepos_conf_path,), settings)
+ if binrepos_conf and any(repo.name for repo in binrepos_conf.values()):
+ append("Binary Repositories:\n")
+ for repo in reversed(list(binrepos_conf.values())):
+ # Omit repos from the PORTAGE_BINHOST variable, since they
+ # do not have a name to label them with.
+ if repo.name:
+ append(repo.info_string())
+
installed_sets = sorted(s for s in
root_config.sets['selected'].getNonAtoms() if s.startswith(SETPREFIX))
if installed_sets: