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

Collapse All | Expand All

(-)pym/portage.py (-3 / +31 lines)
Lines 1693-1698 Link Here
1693
		cp = dep_getkey(mycpv)
1693
		cp = dep_getkey(mycpv)
1694
		cpv_slot = self.mycpv
1694
		cpv_slot = self.mycpv
1695
		pkginternaluse = ""
1695
		pkginternaluse = ""
1696
		iuse = ""
1696
		if mydb:
1697
		if mydb:
1697
			slot, iuse = mydb.aux_get(self.mycpv, ["SLOT", "IUSE"])
1698
			slot, iuse = mydb.aux_get(self.mycpv, ["SLOT", "IUSE"])
1698
			cpv_slot = "%s:%s" % (self.mycpv, slot)
1699
			cpv_slot = "%s:%s" % (self.mycpv, slot)
Lines 1753-1758 Link Here
1753
			has_changed = True
1754
			has_changed = True
1754
		self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file
1755
		self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file
1755
		self.configdict["pkg"]["USE"]    = self.puse[:] # this gets appended to USE
1756
		self.configdict["pkg"]["USE"]    = self.puse[:] # this gets appended to USE
1757
		if iuse != self.configdict["pkg"].get("IUSE",""):
1758
			self.configdict["pkg"]["IUSE"] = iuse
1759
			has_changed = True
1756
		# CATEGORY is essential for doebuild calls
1760
		# CATEGORY is essential for doebuild calls
1757
		self.configdict["pkg"]["CATEGORY"] = mycpv.split("/")[0]
1761
		self.configdict["pkg"]["CATEGORY"] = mycpv.split("/")[0]
1758
		if has_changed:
1762
		if has_changed:
Lines 1955-1964 Link Here
1955
		usesplit = [ x for x in myflags if \
1959
		usesplit = [ x for x in myflags if \
1956
			x not in self.usemask]
1960
			x not in self.usemask]
1957
1961
1958
		usesplit.sort()
1959
1960
		# Use the calculated USE flags to regenerate the USE_EXPAND flags so
1962
		# Use the calculated USE flags to regenerate the USE_EXPAND flags so
1961
		# that they are consistent.
1963
		# that they are consistent.
1964
		iuse = self.configdict["pkg"].get("IUSE","").split()
1965
		iuse = set([ x.lstrip("+-") for x in iuse ])
1962
		for var in use_expand:
1966
		for var in use_expand:
1963
			prefix = var.lower() + "_"
1967
			prefix = var.lower() + "_"
1964
			prefix_len = len(prefix)
1968
			prefix_len = len(prefix)
Lines 1969-1979 Link Here
1969
			# like LINGUAS.
1973
			# like LINGUAS.
1970
			var_split = [ x for x in var_split if x in expand_flags ]
1974
			var_split = [ x for x in var_split if x in expand_flags ]
1971
			var_split.extend(expand_flags.difference(var_split))
1975
			var_split.extend(expand_flags.difference(var_split))
1972
			if var_split or var in self:
1976
			if (var_split or var in self) and \
1977
				"*" not in var_split:
1973
				# Don't export empty USE_EXPAND vars unless the user config
1978
				# Don't export empty USE_EXPAND vars unless the user config
1974
				# exports them as empty.  This is required for vars such as
1979
				# exports them as empty.  This is required for vars such as
1975
				# LINGUAS, where unset and empty have different meanings.
1980
				# LINGUAS, where unset and empty have different meanings.
1976
				self[var] = " ".join(var_split)
1981
				self[var] = " ".join(var_split)
1982
			elif "*" in var_split:
1983
				# * means to enable everything in IUSE that's not masked
1984
				filtered_split = []
1985
				for x in var_split:
1986
					if x == "*":
1987
						continue
1988
					if (prefix + x) in iuse:
1989
						filtered_split.append(x)
1990
				var_split = filtered_split
1991
				for x in iuse:
1992
					if x.startswith(prefix) and x not in self.usemask:
1993
						suffix = x[prefix_len:]
1994
						if suffix in var_split:
1995
							continue
1996
						var_split.append(suffix)
1997
						usesplit.append(x)
1998
				if var_split:
1999
					self[var] = " ".join(var_split)
2000
				elif var in self:
2001
					# ebuild.sh will see this and unset the variable so
2002
					# that things like LINGUAS work properly
2003
					self[var] = "*"
1977
2004
1978
		# Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch.
2005
		# Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch.
1979
		if self.configdict["defaults"].has_key("ARCH"):
2006
		if self.configdict["defaults"].has_key("ARCH"):
Lines 1981-1986 Link Here
1981
				if self.configdict["defaults"]["ARCH"] not in usesplit:
2008
				if self.configdict["defaults"]["ARCH"] not in usesplit:
1982
					usesplit.insert(0,self.configdict["defaults"]["ARCH"])
2009
					usesplit.insert(0,self.configdict["defaults"]["ARCH"])
1983
2010
2011
		usesplit.sort()
1984
		self.configlist[-1]["USE"]= " ".join(usesplit)
2012
		self.configlist[-1]["USE"]= " ".join(usesplit)
1985
2013
1986
		self.already_in_regenerate = 0
2014
		self.already_in_regenerate = 0
(-)bin/ebuild.sh (+5 lines)
Lines 1585-1590 Link Here
1585
	done
1585
	done
1586
	export IUSE=${iuse_temp}
1586
	export IUSE=${iuse_temp}
1587
	unset iuse_temp
1587
	unset iuse_temp
1588
	# unset USE_EXPAND variables that contain only the special "*" token
1589
	for x in ${USE_EXPAND} ; do
1590
		[ "${!x}" == "*" ] && unset ${x}
1591
	done
1592
	unset x
1588
	# Lock the dbkey variables after the global phase
1593
	# Lock the dbkey variables after the global phase
1589
	declare -r DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE DESCRIPTION
1594
	declare -r DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE DESCRIPTION
1590
	declare -r KEYWORDS INHERITED IUSE PDEPEND PROVIDE
1595
	declare -r KEYWORDS INHERITED IUSE PDEPEND PROVIDE

Return to bug 148702