def porttree_matches(name):
 matches = []
 for category in _porttree().dbapi.categories:
  if _porttree().dbapi.cp_list(((category + '/') + name)):
   matches.append(((category + '/') + name))
 return matches

def porttree_matches ( name ) : matches = [ ] for category in _porttree ( ) . dbapi . categories : if _porttree ( ) . dbapi . cp_list ( ( ( category + '/' ) + name ) ) : matches . append ( ( ( category + '/' ) + name ) ) return matches
returns a list containing the matches for a given package name from the portage tree .