aboutsummaryrefslogtreecommitdiff
blob: d33cf45570c60dae0569301e9b4d33fa015c4f83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

import re
import portage
import _emerge.depgraph

def is_valid_package_atom(x, allow_repo=False):
	if "/" not in x:
		x2 = _emerge.depgraph.insert_category_into_atom(x, 'cat')
		if x2 != None:
			x = x2
	return portage.isvalidatom(x, allow_blockers=False, allow_repo=allow_repo)