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 73A9C1381F3 for ; Fri, 24 May 2013 18:12:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17AF2E0943; Fri, 24 May 2013 18:12:49 +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 A6554E0943 for ; Fri, 24 May 2013 18:12:48 +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 B057333DFFC for ; Fri, 24 May 2013 18:12:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 4F15AE4404 for ; Fri, 24 May 2013 18:12:46 +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: <1369419143.13020ad05b8aca4de723c7fd55fc05dcd7937939.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 13020ad05b8aca4de723c7fd55fc05dcd7937939 X-VCS-Branch: master Date: Fri, 24 May 2013 18:12:46 +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: 72947001-046f-45b7-99c3-953e6dd25138 X-Archives-Hash: 06a46d850b09c517ccf083101b35ab19 commit: 13020ad05b8aca4de723c7fd55fc05dcd7937939 Author: Zac Medico gentoo org> AuthorDate: Fri May 24 18:12:23 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri May 24 18:12:23 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13020ad0 _find_bad_atoms: use insert_category_into_atom This shares/aligns logic with is_valid_package_atom. --- pym/_emerge/main.py | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index ce00ae3..e066c87 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -9,11 +9,13 @@ import sys import portage portage.proxy.lazyimport.lazyimport(globals(), 'logging', + 'portage.dep:Atom', 'portage.util:writemsg_level', 'textwrap', '_emerge.actions:load_emerge_config,run_action,' + \ 'validate_ebuild_environment', '_emerge.help:help@emerge_help', + '_emerge.is_valid_package_atom:insert_category_into_atom' ) from portage import os @@ -258,14 +260,17 @@ def _find_bad_atoms(atoms, less_strict=False): """ bad_atoms = [] for x in ' '.join(atoms).split(): + atom = x + if "/" not in x.split(":")[0]: + x_cat = insert_category_into_atom(x, 'dummy-category') + if x_cat is not None: + atom = x_cat + bad_atom = False try: - atom = portage.dep.Atom(x, allow_wildcard=True, allow_repo=less_strict) + atom = Atom(atom, allow_wildcard=True, allow_repo=less_strict) except portage.exception.InvalidAtom: - try: - atom = portage.dep.Atom("*/"+x, allow_wildcard=True, allow_repo=less_strict) - except portage.exception.InvalidAtom: - bad_atom = True + bad_atom = True if bad_atom or (atom.operator and not less_strict) or atom.blocker or atom.use: bad_atoms.append(x)