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

Collapse All | Expand All

(-)bin/emerge (-28 / +41 lines)
Lines 778-788 Link Here
778
		SOFT     The upper boundary for soft dependencies.
778
		SOFT     The upper boundary for soft dependencies.
779
		MIN      The lower boundary for soft dependencies.
779
		MIN      The lower boundary for soft dependencies.
780
	"""
780
	"""
781
	__slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post")
781
	__slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post", "rebuild")
782
	MEDIUM = -1
782
	MEDIUM = -1
783
	MEDIUM_SOFT = -2
783
	MEDIUM_SOFT = -2
784
	SOFT   = -3
784
	SOFT   = -3
785
	MIN    = -5
785
	MIN    = -6
786
	def __init__(self, **kwargs):
786
	def __init__(self, **kwargs):
787
		for myattr in self.__slots__:
787
		for myattr in self.__slots__:
788
			if myattr == "__weakref__":
788
			if myattr == "__weakref__":
Lines 797-809 Link Here
797
				return -1
797
				return -1
798
			if self.runtime_post:
798
			if self.runtime_post:
799
				return -2
799
				return -2
800
		if self.rebuild:
801
			return -3
800
		if self.buildtime:
802
		if self.buildtime:
801
			return -3
803
			return -4
802
		if self.runtime:
804
		if self.runtime:
803
			return -4
805
			return -5
804
		if self.runtime_post:
806
		if self.runtime_post:
805
			return -5
807
			return -6
806
		return -5
808
		return -6
807
	def __lt__(self, other):
809
	def __lt__(self, other):
808
		return self.__int__() < other
810
		return self.__int__() < other
809
	def __le__(self, other):
811
	def __le__(self, other):
Lines 1244-1267 Link Here
1244
		#"no downgrade" emerge
1246
		#"no downgrade" emerge
1245
		"""
1247
		"""
1246
		mytype, myroot, mykey = mybigkey
1248
		mytype, myroot, mykey = mybigkey
1247
		existing_node = None
1249
1248
		if addme:
1249
			existing_node = self.pkg_node_map[myroot].get(mykey)
1250
		if existing_node:
1251
			self._parent_child_digraph.add(existing_node, myparent)
1252
			if existing_node != myparent:
1253
				# Refuse to make a node depend on itself so that the we don't
1254
				# don't create a bogus circular dependency in self.altlist().
1255
				if rev_dep and myparent:
1256
					self.digraph.addnode(myparent, existing_node,
1257
						priority=priority)
1258
				else:
1259
					self.digraph.addnode(existing_node, myparent,
1260
						priority=priority)
1261
			return 1
1262
		
1263
		if "--nodeps" not in self.myopts:
1264
			self.spinner.update()
1265
		if mytype == "blocks":
1250
		if mytype == "blocks":
1266
			if myparent and \
1251
			if myparent and \
1267
				"--buildpkgonly" not in self.myopts and \
1252
				"--buildpkgonly" not in self.myopts and \
Lines 1303-1308 Link Here
1303
					return 0
1288
					return 0
1304
				del e
1289
				del e
1305
1290
1291
		# normal arg, not system or world
1292
		if arg and len(self._sets) == 1 and \
1293
			"selective" not in self.myparams:
1294
			# For revdep-rebuild, dependencies on packages specified as
1295
			# arguments are given higher priority since the currently
1296
			# installed version has been rendered useless by ABI breakage.
1297
			# It's okay to increase the priority here even if the caller
1298
			# is not revdep-rebuild.
1299
			if priority.satisfied:
1300
				priority.rebuild = True
1301
1302
		existing_node = None
1303
		if addme:
1304
			existing_node = self.pkg_node_map[myroot].get(mykey)
1305
		if existing_node:
1306
			self._parent_child_digraph.add(existing_node, myparent)
1307
			if existing_node != myparent:
1308
				# Refuse to make a node depend on itself so that the we don't
1309
				# don't create a bogus circular dependency in self.altlist().
1310
				if rev_dep and myparent:
1311
					self.digraph.addnode(myparent, existing_node,
1312
						priority=priority)
1313
				else:
1314
					self.digraph.addnode(existing_node, myparent,
1315
						priority=priority)
1316
			return 1
1317
		
1318
		if "--nodeps" not in self.myopts:
1319
			self.spinner.update()
1320
1306
		reinstall_for_flags = None
1321
		reinstall_for_flags = None
1307
		merging=1
1322
		merging=1
1308
		if mytype == "installed":
1323
		if mytype == "installed":
Lines 2237-2245 Link Here
2237
			self._altlist_cache[reversed] = retlist[:]
2252
			self._altlist_cache[reversed] = retlist[:]
2238
			return retlist
2253
			return retlist
2239
		mygraph=self.digraph.copy()
2254
		mygraph=self.digraph.copy()
2240
		for node in mygraph.order[:]:
2241
			if node[-1] == "nomerge":
2242
				mygraph.remove(node)
2243
		self._merge_order_bias(mygraph)
2255
		self._merge_order_bias(mygraph)
2244
		myblockers = self.blocker_digraph.copy()
2256
		myblockers = self.blocker_digraph.copy()
2245
		retlist=[]
2257
		retlist=[]
Lines 2431-2437 Link Here
2431
			prefer_asap = True
2443
			prefer_asap = True
2432
2444
2433
			for node in selected_nodes:
2445
			for node in selected_nodes:
2434
				retlist.append(list(node))
2446
				if node[-1] != "nomerge":
2447
					retlist.append(list(node))
2435
				mygraph.remove(node)
2448
				mygraph.remove(node)
2436
				if not reversed and not circular_blocks and myblockers.contains(node):
2449
				if not reversed and not circular_blocks and myblockers.contains(node):
2437
					"""This node may have invalidated one or more blockers."""
2450
					"""This node may have invalidated one or more blockers."""

Return to bug 188782