* [gentoo-commits] portage r12746 - main/trunk/pym/_emerge
@ 2009-03-04 4:14 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-04 4:14 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-03-04 04:14:18 +0000 (Wed, 04 Mar 2009)
New Revision: 12746
Modified:
main/trunk/pym/_emerge/__init__.py
Log:
Bug #256289 - When displaying an unsatisfied USE dep and all packages with
the required IUSE are masked, show a normal "masked package" message for
the package(s) that have the required IUSE (instead of showing the unmasked
packages with missing IUSE).
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2009-03-04 02:26:24 UTC (rev 12745)
+++ main/trunk/pym/_emerge/__init__.py 2009-03-04 04:14:18 UTC (rev 12746)
@@ -5934,6 +5934,7 @@
xinfo = xinfo.replace("null/", "")
masked_packages = []
missing_use = []
+ masked_pkg_instances = set()
missing_licenses = []
have_eapi_mask = False
pkgsettings = self.pkgsettings[root]
@@ -5965,9 +5966,12 @@
# Filter out any such false matches here.
if not atom_set.findAtomForPackage(pkg):
continue
- if atom.use and not mreasons:
+ if mreasons:
+ masked_pkg_instances.add(pkg)
+ if atom.use:
missing_use.append(pkg)
- continue
+ if not mreasons:
+ continue
masked_packages.append(
(root_config, pkgsettings, cpv, metadata, mreasons))
@@ -5997,16 +6001,28 @@
mreasons.append("Change USE: %s" % " ".join(changes))
missing_use_reasons.append((pkg, mreasons))
- if missing_iuse_reasons and not missing_use_reasons:
- missing_use_reasons = missing_iuse_reasons
- elif missing_use_reasons:
+ unmasked_use_reasons = [(pkg, mreasons) for (pkg, mreasons) \
+ in missing_use_reasons if pkg not in masked_pkg_instances]
+
+ unmasked_iuse_reasons = [(pkg, mreasons) for (pkg, mreasons) \
+ in missing_iuse_reasons if pkg not in masked_pkg_instances]
+
+ show_missing_use = False
+ if unmasked_use_reasons:
# Only show the latest version.
- del missing_use_reasons[1:]
+ show_missing_use = unmasked_use_reasons[:1]
+ elif unmasked_iuse_reasons:
+ if missing_use_reasons:
+ # All packages with required IUSE are masked,
+ # so display a normal masking message.
+ pass
+ else:
+ show_missing_use = unmasked_iuse_reasons
- if missing_use_reasons:
+ if show_missing_use:
print "\nemerge: there are no ebuilds built with USE flags to satisfy "+green(xinfo)+"."
print "!!! One of the following packages is required to complete your request:"
- for pkg, mreasons in missing_use_reasons:
+ for pkg, mreasons in show_missing_use:
print "- "+pkg.cpv+" ("+", ".join(mreasons)+")"
elif masked_packages:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-04 4:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 4:14 [gentoo-commits] portage r12746 - main/trunk/pym/_emerge Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox