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/portage/__init__.py (-34 / +17 lines)
Lines 3-9 Link Here
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Id$
4
# $Id$
5
5
6
7
VERSION="$Rev$"[6:-2] + "-svn"
6
VERSION="$Rev$"[6:-2] + "-svn"
8
7
9
# ===========================================================================
8
# ===========================================================================
Lines 110-116 except ImportError, e: Link Here
110
	sys.stderr.write("    "+str(e)+"\n\n")
109
	sys.stderr.write("    "+str(e)+"\n\n")
111
	raise
110
	raise
112
111
113
114
try:
112
try:
115
	import portage._selinux as selinux
113
	import portage._selinux as selinux
116
except OSError, e:
114
except OSError, e:
Lines 2385-2420 class config(object): Link Here
2385
			if x not in iuse_implicit and x[-2:] != '_*'])
2383
			if x not in iuse_implicit and x[-2:] != '_*'])
2386
2384
2387
		# Use the calculated USE flags to regenerate the USE_EXPAND flags so
2385
		# Use the calculated USE flags to regenerate the USE_EXPAND flags so
2388
		# that they are consistent. For optimal performance, use slice
2386
		# that they are consistent.
2389
		# comparison instead of startswith().
2387
		use_expand_split = set(x.lower() for x in set(self.get("USE_EXPAND", "").split()))
2390
		use_expand_split = self.get("USE_EXPAND", "").split()
2391
		lazy_use_expand = self._lazy_use_expand(use, self.usemask,
2388
		lazy_use_expand = self._lazy_use_expand(use, self.usemask,
2392
			iuse_implicit, use_expand_split, self._use_expand_dict)
2389
			iuse_implicit, use_expand_split, self._use_expand_dict)
2393
		use_expand_iuse = set()
2390
		use_expand_iuses = dict()
2394
		for key in use_expand_split:
2391
		for item in iuse_implicit:
2395
			prefix = key.lower() + '_'
2392
			s = item.split("_", 1)
2396
			prefix_len = len(prefix)
2393
			if len(s) > 1:
2397
			expand_flags = set( x[prefix_len:] for x in use \
2394
				prefix = s[0]
2398
				if x[:prefix_len] == prefix )
2395
				l = use_expand_iuses.get(prefix, set())
2399
			use_expand_iuse.clear()
2396
				if not l:
2400
			for x in iuse_implicit:
2397
					use_expand_iuses[prefix] = l
2401
				if x[:prefix_len] == prefix:
2398
				l.add(item)
2402
					use_expand_iuse.add(x)
2399
2400
		for (prefix, use_expand_iuse) in use_expand_iuses.iteritems():
2403
			# * means to enable everything in IUSE that's not masked
2401
			# * means to enable everything in IUSE that's not masked
2404
			if use_expand_iuse and '*' in expand_flags:
2402
			if use_expand_iuse and (prefix + '*' in use):
2405
				for x in use_expand_iuse:
2403
				use.update( x for x in use_expand_iuse if x not in usemask )
2406
					if x not in usemask:
2404
			self.configdict['env'].addLazySingleton(
2407
						use.add(x)
2405
				prefix, lazy_use_expand.__getitem__, prefix)
2408
			if use_expand_iuse:
2409
				self.configdict['env'].addLazySingleton(
2410
					key, lazy_use_expand.__getitem__, key)
2411
			else:
2412
				# It's not in IUSE, so just allow the variable content
2413
				# to pass through if it is defined somewhere.  This
2414
				# allows packages that support LINGUAS but don't
2415
				# declare it in IUSE to use the variable outside of the
2416
				# USE_EXPAND context.
2417
				pass
2418
2406
2419
		# Filtered for the ebuild environment. Store this in a separate
2407
		# Filtered for the ebuild environment. Store this in a separate
2420
		# attribute since we still want to be able to see global USE
2408
		# attribute since we still want to be able to see global USE
Lines 2858-2864 class config(object): Link Here
2858
			# an incremental!
2846
			# an incremental!
2859
			myincrementals.remove("USE")
2847
			myincrementals.remove("USE")
2860
2848
2861
2862
		mydbs = self.configlist[:-1]
2849
		mydbs = self.configlist[:-1]
2863
		mydbs.append(self.backupenv)
2850
		mydbs.append(self.backupenv)
2864
2851
Lines 6360-6366 def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, Link Here
6360
			# so do not check them again.
6347
			# so do not check them again.
6361
			checkme = []
6348
			checkme = []
6362
6349
6363
6364
		if not emerge_skip_distfiles and \
6350
		if not emerge_skip_distfiles and \
6365
			need_distfiles and not fetch(
6351
			need_distfiles and not fetch(
6366
			fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
6352
			fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
Lines 7221-7227 def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): Link Here
7221
7207
7222
	assert(False) # This point should not be reachable
7208
	assert(False) # This point should not be reachable
7223
7209
7224
7225
def dep_expand(mydep, mydb=None, use_cache=1, settings=None):
7210
def dep_expand(mydep, mydb=None, use_cache=1, settings=None):
7226
	if not len(mydep):
7211
	if not len(mydep):
7227
		return mydep
7212
		return mydep
Lines 7700-7706 def getmaskingstatus(mycpv, settings=None, portdb=None): Link Here
7700
7685
7701
	return rValue
7686
	return rValue
7702
7687
7703
7704
auxdbkeys=[
7688
auxdbkeys=[
7705
  'DEPEND',    'RDEPEND',   'SLOT',      'SRC_URI',
7689
  'DEPEND',    'RDEPEND',   'SLOT',      'SRC_URI',
7706
	'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
7690
	'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
Lines 8398-8404 def init_legacy_globals(): Link Here
8398
8382
8399
	root = settings["ROOT"]
8383
	root = settings["ROOT"]
8400
8384
8401
8402
	# ========================================================================
8385
	# ========================================================================
8403
	# COMPATIBILITY
8386
	# COMPATIBILITY
8404
	# These attributes should not be used
8387
	# These attributes should not be used

Return to bug 276813