summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-12 22:22:09 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-12 22:22:09 -0700
commitc646a13990bc1267ab5f557d72f3c02c08be82ad (patch)
treea8888f38d7562ed824e1d19a6584dda3d789864e
parent_validate_deps: pass myrepo to aux_get (diff)
downloadportage-c646a13990bc1267ab5f557d72f3c02c08be82ad.tar.gz
portage-c646a13990bc1267ab5f557d72f3c02c08be82ad.tar.bz2
portage-c646a13990bc1267ab5f557d72f3c02c08be82ad.zip
ebuild(1): remove unneeded porttrees modification
This code should be unnecessary, as long as the repo is correctly identified for all calls to portdbapi methods like aux_get and findname. Notably, config.setcpv() must be called with a Package instance in order to ensure that it gets the metadata from the correct repository.
-rwxr-xr-xbin/ebuild10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 1408dd32e..95f4e15b8 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -153,14 +153,9 @@ if ebuild_portdir != vdb_path and \
print("Appending %s to PORTDIR_OVERLAY..." % ebuild_portdir)
imp.reload(portage)
-# Constrain eclass resolution to the master(s)
-# that are specified in layout.conf (using an
-# approach similar to repoman's).
myrepo = None
if ebuild_portdir != vdb_path:
myrepo = portage.portdb.getRepositoryName(ebuild_portdir)
- repo_info = portage.portdb._repo_info[ebuild_portdir]
- portage.portdb.porttrees = list(repo_info.eclass_db.porttrees)
if not os.path.exists(ebuild):
print("'%s' does not exist." % ebuild)
@@ -282,7 +277,10 @@ pkg = Package(built=(pkg_type != "ebuild"), cpv=cpv,
# Apply package.env and repo-level settings. This allows per-package
# FEATURES and other variables (possibly PORTAGE_TMPDIR) to be
-# available as soon as possible.
+# available as soon as possible. Also, note that the only way to ensure
+# that setcpv gets metadata from the correct repository is to pass in
+# a Package instance, as we do here (previously we had to modify
+# portdb.porttrees in order to accomplish this).
tmpsettings.setcpv(pkg)
def stale_env_warning():