insert_category_into_atom: handle wildcard
authorZac Medico <zmedico@gentoo.org>
Mon, 18 Mar 2013 10:21:42 +0000 (03:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 18 Mar 2013 10:21:42 +0000 (03:21 -0700)
pym/_emerge/is_valid_package_atom.py

index c4f6ffdf34e53f030521beb1cbe92a9bc6e891e7..112afc1ecd62567884396bec89fbf3c7949e5233 100644 (file)
@@ -1,11 +1,12 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import re
 from portage.dep import isvalidatom
 
 def insert_category_into_atom(atom, category):
-       alphanum = re.search(r'\w', atom, re.UNICODE)
+       # Handle '*' character for "extended syntax" wildcard support.
+       alphanum = re.search(r'[\*\w]', atom, re.UNICODE)
        if alphanum:
                ret = atom[:alphanum.start()] + "%s/" % category + \
                        atom[alphanum.start():]