From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Pu7PH-0002ZD-Oh for garchives@archives.gentoo.org; Mon, 28 Feb 2011 18:01:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA6B0E04ED; Mon, 28 Feb 2011 18:01:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AE095E04ED for ; Mon, 28 Feb 2011 18:01:07 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1D4031B4069 for ; Mon, 28 Feb 2011 18:01:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2CFC78006A for ; Mon, 28 Feb 2011 18:01:06 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8 Date: Mon, 28 Feb 2011 18:01:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 1cea306e2bf5cb658a1ee26c17107f38 commit: 9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8 Author: Zac Medico gentoo org> AuthorDate: Mon Feb 28 17:58:27 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Feb 28 17:58:27 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D9ce6da43 depgraph: case insensitive search for unsatisfied This will fix bug #356555. --- pym/_emerge/depgraph.py | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 7e55c77..b9c308b 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2738,7 +2738,7 @@ class depgraph(object): else: writemsg_stdout("\nemerge: there are no ebuilds to satisfy "+green(xi= nfo)+".\n", noiselevel=3D-1) if isinstance(myparent, AtomArg): - cp =3D myparent.atom.cp + cp =3D myparent.atom.cp.lower() cat, pkg =3D portage.catsplit(cp) if cat =3D=3D "null": cat =3D None @@ -2752,6 +2752,12 @@ class depgraph(object): if "--usepkg" in self._frozen_config.myopts: all_cp.update(bindb.cp_all()) =20 + orig_cp_map =3D {} + for cp in all_cp: + cp_lower =3D cp.lower() + orig_cp_map.setdefault(cp_lower, []).append(cp) + all_cp =3D set(orig_cp_map) + if cat: matches =3D difflib.get_close_matches(cp, all_cp) else: @@ -2764,6 +2770,11 @@ class depgraph(object): for pkg_match in pkg_matches: matches.extend(pkg_to_cp[pkg_match]) =20 + matches_orig_case =3D [] + for cp in matches: + matches_orig_case.extend(orig_cp_map[cp]) + matches =3D matches_orig_case + if len(matches) =3D=3D 1: writemsg_stdout("\nemerge: Maybe you meant " + matches[0] + "?\n" , noiselevel=3D-1)