blob: 6295667a5f9657b569a4268b1b8a067bd556ba7b [file] [log] [blame]
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import re
import portage
def is_valid_package_atom(x):
if "/" not in x:
alphanum = re.search(r'\w', x)
if alphanum:
x = x[:alphanum.start()] + "cat/" + x[alphanum.start():]
return portage.isvalidatom(x, allow_blockers=False)