# Copyright 1999-2009 Gentoo Foundation# Distributed under the terms of the GNU General Public License v2# $Id$importreimportportagedefis_valid_package_atom(x):if"/"notinx:alphanum=re.search(r'\w',x)ifalphanum:x=x[:alphanum.start()]+"cat/"+x[alphanum.start():]returnportage.isvalidatom(x,allow_blockers=False)