to /usr/share/portage/config/repos.conf.
EXEMODE = 0755
DIRMODE = 0755
SYSCONFDIR_FILES = etc-update.conf dispatch-conf.conf
-PORTAGE_CONFDIR_FILES = make.globals
+PORTAGE_CONFDIR_FILES = make.globals repos.conf
LOGROTATE_FILES = elog-save-summary
BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
emirrordist portageq quickpkg repoman
layout_conf_data = portage.repository.config.parse_layout_conf(portdir_overlay)[0]
if layout_conf_data['repo-name']:
repo_name = layout_conf_data['repo-name']
- repos_conf_file = os.path.join(repoman_settings["PORTAGE_CONFIGROOT"], portage.const.USER_CONFIG_PATH, "repos.conf")
tmp_conf_file = io.StringIO(textwrap.dedent("""
[%s]
location = %s
repoman_settings['PORTDIR_OVERLAY'] = "%s %s" % \
(repoman_settings.get('PORTDIR_OVERLAY', ''),
portage._shell_quote(portdir_overlay))
- repositories = portage.repository.config.RepoConfigLoader([repos_conf_file, tmp_conf_file], repoman_settings)
+ repositories = portage.repository.config.load_repository_config(repoman_settings, extra_files=[tmp_conf_file])
# We have to call the config constructor again so that attributes
# dependent on config.repositories are initialized correctly.
repoman_settings = portage.config(config_root=config_root, local_config=False, repositories=repositories)
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
-# Repository Paths
-PORTDIR=/usr/portage
-DISTDIR=${PORTDIR}/distfiles
-PKGDIR=${PORTDIR}/packages
-RPMDIR=${PORTDIR}/rpm
+# Miscellaneous paths
+DISTDIR=/usr/portage/distfiles
+PKGDIR=/usr/portage/packages
+RPMDIR=/usr/portage/rpm
# Temporary build directory
PORTAGE_TMPDIR=/var/tmp
--- /dev/null
+[DEFAULT]
+main-repo = gentoo
+
+[gentoo]
+location = /usr/portage
.BR /usr/share/portage/config/
.nf
make.globals
+repos.conf
.fi
.TP
.BR /var/cache/edb/
.TP
.BR make.globals
The global default settings for Portage. This comes from the portage package
-itself. Settings in \fBmake.conf\fR or \fBpackage.env\fR
-override values here. The format
-is described extensivly in \fBmake.conf\fR(5).
+itself. Settings in \fBmake.conf\fR or \fBpackage.env\fR override values set
+here. The format is described extensively in \fBmake.conf\fR(5).
+.TP
+.BR repos.conf
+The default configuration of repositories for Portage. This comes from
+the portage package itself. Settings in \fB/etc/portage/repos.conf\fR
+override values set here. The format is described extensively in section
+for \fB/etc/portage/repos.conf\fR.
.RE
.TP
.BR /var/cache/edb/
import portage
from portage import eclass_cache, os
from portage.const import (MANIFEST2_HASH_FUNCTIONS, MANIFEST2_REQUIRED_HASH,
- REPO_NAME_LOC, USER_CONFIG_PATH)
+ PORTAGE_BASE_PATH, REPO_NAME_LOC, USER_CONFIG_PATH)
from portage.eapi import eapi_allows_directories_on_profile_level_and_repository_level
from portage.env.loaders import KeyValuePairFileLoader
from portage.util import (normalize_path, read_corresponding_eapi_file, shlex_split,
config_string += "%s = %s\n" % (key.replace("_", "-"), " ".join(x.name for x in getattr(repo, key)))
return config_string
-def load_repository_config(settings):
+def load_repository_config(settings, extra_files=None):
repoconfigpaths = []
if "PORTAGE_REPOSITORIES" in settings:
repoconfigpaths.append(io.StringIO(settings["PORTAGE_REPOSITORIES"]))
else:
- # repoconfigpaths.append(os.path.join(settings.global_config_path, "repos.conf"))
+ if portage._working_copy:
+ repoconfigpaths.append(os.path.join(PORTAGE_BASE_PATH, "cnf", "repos.conf"))
+ else:
+ repoconfigpaths.append(os.path.join(settings.global_config_path, "repos.conf"))
repoconfigpaths.append(os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH, "repos.conf"))
+ if extra_files:
+ repoconfigpaths.extend(extra_files)
return RepoConfigLoader(repoconfigpaths, settings)
def _get_repo_name(repo_location, cached=None):