From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D97161381F3 for ; Mon, 26 Nov 2012 03:27:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1B5F21C02A; Mon, 26 Nov 2012 03:27:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3374821C02A for ; Mon, 26 Nov 2012 03:27:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3660533D948 for ; Mon, 26 Nov 2012 03:27:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B02F7E5436 for ; Mon, 26 Nov 2012 03:27:03 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1353900406.c3bc709ae99074ed65584ad68ff403d2e75ae04f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/_similar_name_search.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c3bc709ae99074ed65584ad68ff403d2e75ae04f X-VCS-Branch: master Date: Mon, 26 Nov 2012 03:27:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 98a71321-6035-4d3a-96ef-8e90b1656804 X-Archives-Hash: 6ad7711647d4d2184369e24174d7a1bb commit: c3bc709ae99074ed65584ad68ff403d2e75ae04f Author: Zac Medico gentoo org> AuthorDate: Mon Nov 26 03:26:46 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Nov 26 03:26:46 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c3bc709a similar_name_search: fix lower/upper case bugs --- pym/portage/dbapi/_similar_name_search.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/portage/dbapi/_similar_name_search.py b/pym/portage/dbapi/_similar_name_search.py index d569fbf..b6e4a1f 100644 --- a/pym/portage/dbapi/_similar_name_search.py +++ b/pym/portage/dbapi/_similar_name_search.py @@ -7,8 +7,8 @@ from portage.versions import catsplit def similar_name_search(dbs, atom): - cp = atom.cp.lower() - cat, pkg = catsplit(cp) + cp_lower = atom.cp.lower() + cat, pkg = catsplit(cp_lower) if cat == "null": cat = None @@ -17,7 +17,7 @@ def similar_name_search(dbs, atom): all_cp.update(db.cp_all()) # discard dir containing no ebuilds - all_cp.discard(cp) + all_cp.discard(atom.cp) orig_cp_map = {} for cp_orig in all_cp: @@ -25,7 +25,7 @@ def similar_name_search(dbs, atom): all_cp = set(orig_cp_map) if cat: - matches = difflib.get_close_matches(cp, all_cp) + matches = difflib.get_close_matches(cp_lower, all_cp) else: pkg_to_cp = {} for other_cp in list(all_cp):