summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-20 05:08:10 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-20 05:08:10 +0000
commit0d228ecba942810e6ad13c70e9e9f9eaf578db6c (patch)
tree67deafb3ce8a30563199e7e01b8039dea13c52f4
parent3d95c727bbd0261b49c8fa3e09e64a53177335db (diff)
downloadportage-0d228ecba942810e6ad13c70e9e9f9eaf578db6c.tar.gz
portage-0d228ecba942810e6ad13c70e9e9f9eaf578db6c.tar.bz2
portage-0d228ecba942810e6ad13c70e9e9f9eaf578db6c.zip
If a package is in the world set but it's not installed, go ahead and install it if it's available (instead of telling the user to run emaint).
svn path=/main/trunk/; revision=6883
-rw-r--r--pym/emerge/__init__.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 5d7c69615..bf6dd5a36 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -2217,10 +2217,22 @@ class depgraph:
for x in worlddict.keys():
if not portage.isvalidatom(x):
world_problems = True
- elif not self.trees[self.target_root]["vartree"].dbapi.match(x):
- world_problems = True
- else:
- mylist.append(x)
+ continue
+ elif not vardb.match(x):
+ available = False
+ if "--usepkgonly" not in self.myopts and \
+ portdb.match(x):
+ available = True
+ elif "--usepkg" in self.myopts:
+ mymatches = bindb.match(x)
+ if "--usepkgonly" not in self.myopts:
+ mymatches = visible(mymatches)
+ if mymatches:
+ available = True
+ if not available:
+ world_problems = True
+ continue
+ mylist.append(x)
newlist = []
for atom in mylist: