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 (-27 / +25 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 2338-2343 class config(object): Link Here
2338
		for k in pkg_configdict:
2336
		for k in pkg_configdict:
2339
			if k != 'USE':
2337
			if k != 'USE':
2340
				env_configdict.pop(k, None)
2338
				env_configdict.pop(k, None)
2339
		del k
2341
2340
2342
		lazy_vars = self._lazy_vars(built_use, self)
2341
		lazy_vars = self._lazy_vars(built_use, self)
2343
		env_configdict.addLazySingleton('ACCEPT_LICENSE',
2342
		env_configdict.addLazySingleton('ACCEPT_LICENSE',
Lines 2391-2422 class config(object): Link Here
2391
		lazy_use_expand = self._lazy_use_expand(use, self.usemask,
2390
		lazy_use_expand = self._lazy_use_expand(use, self.usemask,
2392
			iuse_implicit, use_expand_split, self._use_expand_dict)
2391
			iuse_implicit, use_expand_split, self._use_expand_dict)
2393
2392
2394
		use_expand_iuses = {}
2395
		for x in iuse_implicit:
2396
			x_split = x.split('_')
2397
			if len(x_split) == 1:
2398
				continue
2399
			for i in xrange(len(x_split) - 1):
2400
				k = '_'.join(x_split[:i+1])
2401
				if k in use_expand_split:
2402
					v = use_expand_iuses.get(k)
2403
					if v is None:
2404
						v = set()
2405
						use_expand_iuses[k] = v
2406
					v.add(x)
2407
					break
2408
2393
2409
		# If it's not in IUSE, variable content is allowed
2394
		# If it's not in IUSE, variable content is allowed
2410
		# to pass through if it is defined somewhere.  This
2395
		# to pass through if it is defined somewhere.  This
2411
		# allows packages that support LINGUAS but don't
2396
		# allows packages that support LINGUAS but don't
2412
		# declare it in IUSE to use the variable outside of the
2397
		# declare it in IUSE to use the variable outside of the
2413
		# USE_EXPAND context.
2398
		# USE_EXPAND context.
2414
		for k, use_expand_iuse in use_expand_iuses.iteritems():
2399
2415
			if k + '_*' in use:
2400
		iuse_implicit = sorted( x for x in iuse_implicit if x.find('_') != -1 )
2416
				use.update( x for x in use_expand_iuse if x not in usemask )
2401
		use_expand_iuse = set()
2417
			k = k.upper()
2402
		k = None
2418
			self.configdict['env'].addLazySingleton(k,
2403
		k_len = None
2419
				lazy_use_expand.__getitem__, k)
2404
		for x in iuse_implicit:
2405
			if not k or x[:k_len] != k:
2406
				if k:
2407
					if k + '_*' in use:
2408
						use.update( use_expand_iuse.difference(usemask) )
2409
					k = k.upper()
2410
					self.configdict['env'].addLazySingleton(k,
2411
						lazy_use_expand.__getitem__, k)
2412
					k = None
2413
					k_len = None
2414
					use_expand_iuse = set()
2415
				l = [y for y in use_expand_split if x[:len(y)] == y]
2416
				if l:
2417
					k = l[0]
2418
					k_len = len(k)
2419
				else:
2420
					continue
2421
			use_expand_iuse.add(x)
2422
		del k, k_len, x, use_expand_iuse
2420
2423
2421
		# Filtered for the ebuild environment. Store this in a separate
2424
		# Filtered for the ebuild environment. Store this in a separate
2422
		# attribute since we still want to be able to see global USE
2425
		# attribute since we still want to be able to see global USE
Lines 2860-2866 class config(object): Link Here
2860
			# an incremental!
2863
			# an incremental!
2861
			myincrementals.remove("USE")
2864
			myincrementals.remove("USE")
2862
2865
2863
2864
		mydbs = self.configlist[:-1]
2866
		mydbs = self.configlist[:-1]
2865
		mydbs.append(self.backupenv)
2867
		mydbs.append(self.backupenv)
2866
2868
Lines 6362-6368 def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, Link Here
6362
			# so do not check them again.
6364
			# so do not check them again.
6363
			checkme = []
6365
			checkme = []
6364
6366
6365
6366
		if not emerge_skip_distfiles and \
6367
		if not emerge_skip_distfiles and \
6367
			need_distfiles and not fetch(
6368
			need_distfiles and not fetch(
6368
			fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
6369
			fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
Lines 7223-7229 def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): Link Here
7223
7224
7224
	assert(False) # This point should not be reachable
7225
	assert(False) # This point should not be reachable
7225
7226
7226
7227
def dep_expand(mydep, mydb=None, use_cache=1, settings=None):
7227
def dep_expand(mydep, mydb=None, use_cache=1, settings=None):
7228
	if not len(mydep):
7228
	if not len(mydep):
7229
		return mydep
7229
		return mydep
Lines 7702-7708 def getmaskingstatus(mycpv, settings=None, portdb=None): Link Here
7702
7702
7703
	return rValue
7703
	return rValue
7704
7704
7705
7706
auxdbkeys=[
7705
auxdbkeys=[
7707
  'DEPEND',    'RDEPEND',   'SLOT',      'SRC_URI',
7706
  'DEPEND',    'RDEPEND',   'SLOT',      'SRC_URI',
7708
	'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
7707
	'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
Lines 8400-8406 def init_legacy_globals(): Link Here
8400
8399
8401
	root = settings["ROOT"]
8400
	root = settings["ROOT"]
8402
8401
8403
8404
	# ========================================================================
8402
	# ========================================================================
8405
	# COMPATIBILITY
8403
	# COMPATIBILITY
8406
	# These attributes should not be used
8404
	# These attributes should not be used

Return to bug 276813