Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 276813 | Differences between
and this patch

Collapse All | Expand All

(-)a/pym/_emerge/Package.py (-1 / +2 lines)
Lines 16-21 except ImportError: Link Here
16
from portage.cache.mappings import slot_dict_class
16
from portage.cache.mappings import slot_dict_class
17
from portage.dep import paren_reduce, use_reduce, \
17
from portage.dep import paren_reduce, use_reduce, \
18
	paren_normalize, paren_enclose
18
	paren_normalize, paren_enclose
19
from portage.util import re_compile
19
from _emerge.Task import Task
20
from _emerge.Task import Task
20
21
21
class Package(Task):
22
class Package(Task):
Lines 112-118 class Package(Task): Link Here
112
				regex = (re.escape(x) for x in \
113
				regex = (re.escape(x) for x in \
113
					chain(self.all, self.iuse_implicit))
114
					chain(self.all, self.iuse_implicit))
114
				regex = "^(%s)$" % "|".join(regex)
115
				regex = "^(%s)$" % "|".join(regex)
115
				regex = re.compile(regex.replace("\\.\\*", ".*"))
116
				regex = re_compile(regex.replace("\\.\\*", ".*"))
116
				self._regex = regex
117
				self._regex = regex
117
				return regex
118
				return regex
118
119
(-)a/pym/portage/dbapi/__init__.py (-5 / +5 lines)
Lines 12-18 portage.proxy.lazyimport.lazyimport(globals(), Link Here
12
	'portage.dep:match_from_list',
12
	'portage.dep:match_from_list',
13
	'portage.locks:unlockfile',
13
	'portage.locks:unlockfile',
14
	'portage.output:colorize',
14
	'portage.output:colorize',
15
	'portage.util:cmp_sort_key,writemsg',
15
	'portage.util:cmp_sort_key,re_compile,writemsg',
16
	'portage.versions:catpkgsplit,vercmp',
16
	'portage.versions:catpkgsplit,vercmp',
17
)
17
)
18
18
Lines 157-168 class dbapi(object): Link Here
157
			except KeyError:
157
			except KeyError:
158
				continue
158
				continue
159
			use = use.split()
159
			use = use.split()
160
			iuse = self._iuse_implicit.union(
160
			iuse = [re.escape(x.lstrip("+-")) for x in iuse.split()]
161
				re.escape(x.lstrip("+-")) for x in iuse.split())
161
			iuse_re = re_compile("^(%s)$" % "|".join(iuse))
162
			iuse_re = re.compile("^(%s)$" % "|".join(iuse))
162
			iuse_implicit_re = re_compile("^(%s)$" % "|".join(self._iuse_implicit))
163
			missing_iuse = False
163
			missing_iuse = False
164
			for x in atom.use.required:
164
			for x in atom.use.required:
165
				if iuse_re.match(x) is None:
165
				if iuse_re.match(x) is None and iuse_implicit_re.match(x) is None:
166
					missing_iuse = True
166
					missing_iuse = True
167
					break
167
					break
168
			if missing_iuse:
168
			if missing_iuse:
(-)a/pym/portage/util.py (-1 / +11 lines)
Lines 8-19 __all__ = ['apply_permissions', 'apply_recursive_permissions', Link Here
8
	'getconfig', 'getlibpaths', 'grabdict', 'grabdict_package', 'grabfile',
8
	'getconfig', 'getlibpaths', 'grabdict', 'grabdict_package', 'grabfile',
9
	'grabfile_package', 'grablines', 'initialize_logger', 'LazyItemsDict',
9
	'grabfile_package', 'grablines', 'initialize_logger', 'LazyItemsDict',
10
	'map_dictlist_vals', 'new_protect_filename', 'normalize_path',
10
	'map_dictlist_vals', 'new_protect_filename', 'normalize_path',
11
	'pickle_read', 'stack_dictlist', 'stack_dicts', 'stack_lists',
11
	'pickle_read', 're_compile' 'stack_dictlist', 'stack_dicts', 'stack_lists',
12
	'unique_array', 'varexpand', 'write_atomic', 'writedict', 'writemsg',
12
	'unique_array', 'varexpand', 'write_atomic', 'writedict', 'writemsg',
13
	'writemsg_level', 'writemsg_stdout']
13
	'writemsg_level', 'writemsg_stdout']
14
14
15
import codecs
15
import codecs
16
import os
16
import os
17
import re
17
import errno
18
import errno
18
import logging
19
import logging
19
import shlex
20
import shlex
Lines 1297-1299 def getlibpaths(root): Link Here
1297
	rval.append("/lib")
1298
	rval.append("/lib")
1298
1299
1299
	return [normalize_path(x) for x in rval if x]
1300
	return [normalize_path(x) for x in rval if x]
1301
1302
re_cache = {}
1303
1304
def re_compile(regex):
1305
	result = re_cache.get(regex)
1306
	if result is None:
1307
		result = re.compile(regex)
1308
		re_cache[regex] = result
1309
	return result

Return to bug 276813