diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-21 22:31:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-21 22:31:08 +0000 |
commit | f57360f4bf7488a47ee16dc64263aec9d7e7275f (patch) | |
tree | 37eda5d0051b7845566ba675c04f34c38df208a7 | |
parent | 545e33b9c3c47a312a38013fc02187929fd7e3e0 (diff) | |
download | portage-f57360f4bf7488a47ee16dc64263aec9d7e7275f.tar.gz portage-f57360f4bf7488a47ee16dc64263aec9d7e7275f.tar.bz2 portage-f57360f4bf7488a47ee16dc64263aec9d7e7275f.zip |
Bug #248059 - Make --depclean more tolerant of invalid atoms in dependencies
of packages that will be uninstalled anyway.
svn path=/main/trunk/; revision=12020
-rw-r--r-- | pym/_emerge/__init__.py | 9 | ||||
-rw-r--r-- | pym/portage/__init__.py | 12 |
2 files changed, 14 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 349263361..44bbe1763 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -12776,11 +12776,10 @@ def action_depclean(settings, trees, ldpath_mtimes, finally: portage.dep._dep_check_strict = True if not success: - show_invalid_depstring_notice( - ("installed", myroot, node, "nomerge"), - depstr, atoms) - return - + # Ignore invalid deps of packages that will + # be uninstalled anyway. + continue + priority = priority_map[dep_type] for atom in atoms: if not isinstance(atom, portage.dep.Atom): diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index d53ac9b25..76ff91233 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -6614,8 +6614,16 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, writemsg("mysplit: %s\n" % (mysplit), 1) writemsg("mysplit2: %s\n" % (mysplit2), 1) - myzaps = dep_zapdeps(mysplit, mysplit2, myroot, - use_binaries=use_binaries, trees=trees) + try: + myzaps = dep_zapdeps(mysplit, mysplit2, myroot, + use_binaries=use_binaries, trees=trees) + except portage.exception.InvalidAtom, e: + if portage.dep._dep_check_strict: + raise # This shouldn't happen. + # dbapi.match() failed due to an invalid atom in + # the dependencies of an installed package. + return [0, "Invalid atom: '%s'" % (e,)] + mylist = flatten(myzaps) writemsg("myzaps: %s\n" % (myzaps), 1) writemsg("mylist: %s\n" % (mylist), 1) |