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

Collapse All | Expand All

(-)a/bin/emerge (-10 / +14 lines)
Lines 679-685 class depgraph: Link Here
679
					"--getbinpkg" in self.myopts,
679
					"--getbinpkg" in self.myopts,
680
					"--getbinpkgonly" in self.myopts)
680
					"--getbinpkgonly" in self.myopts)
681
681
682
	def create(self,mybigkey,myparent=None,addme=1,myuse=None,hard_dep=True,force_merge=False):
682
	def create(self,mybigkey,myparent=None,addme=1,myuse=None,hard_dep=True,arg=None):
683
		"""
683
		"""
684
		Fills the digraph with nodes comprised of packages to merge.
684
		Fills the digraph with nodes comprised of packages to merge.
685
		mybigkey is the package spec of the package to merge.
685
		mybigkey is the package spec of the package to merge.
Lines 744-753 class depgraph: Link Here
744
				    is always included and if in 'selective' mode package is already
744
				    is always included and if in 'selective' mode package is already
745
				    installed we skip merging it."""
745
				    installed we skip merging it."""
746
				if "self" not in self.myparams or \
746
				if "self" not in self.myparams or \
747
					("selective" in self.myparams and not force_merge and \
747
					("selective" in self.myparams and \
748
					vardbapi.cpv_exists(mykey)):
748
					not arg and vardbapi.cpv_exists(mykey)):
749
					merging=0
749
					merging=0
750
			elif "selective" in self.myparams and not force_merge and vardbapi.cpv_exists(mykey):
750
			elif "selective" in self.myparams and vardbapi.cpv_exists(mykey):
751
				merging=0
751
				merging=0
752
752
753
			""" If we aren't merging, perform the --newuse check.
753
			""" If we aren't merging, perform the --newuse check.
Lines 886-892 class depgraph: Link Here
886
					print colorize("BAD", "\n*** You need to adjust PKGDIR to emerge this package.\n")
886
					print colorize("BAD", "\n*** You need to adjust PKGDIR to emerge this package.\n")
887
					sys.exit(1)
887
					sys.exit(1)
888
				if not self.create(["binary", myroot, mykey],
888
				if not self.create(["binary", myroot, mykey],
889
					None, "--onlydeps" not in self.myopts, force_merge=("--noreplace" not in self.myopts)):
889
					None, "--onlydeps" not in self.myopts):
890
					return (0,myfavorites)
890
					return (0,myfavorites)
891
				elif not "--oneshot" in self.myopts:
891
				elif not "--oneshot" in self.myopts:
892
					myfavorites.append(mykey)
892
					myfavorites.append(mykey)
Lines 909-915 class depgraph: Link Here
909
					raise portage_exception.PackageNotFound(
909
					raise portage_exception.PackageNotFound(
910
						"%s is not in a valid portage tree hierarchy or does not exist" % x)
910
						"%s is not in a valid portage tree hierarchy or does not exist" % x)
911
				if not self.create(["ebuild", myroot, mykey],
911
				if not self.create(["ebuild", myroot, mykey],
912
					None, "--onlydeps" not in self.myopts, force_merge=("--noreplace" not in self.myopts)):
912
					None, "--onlydeps" not in self.myopts):
913
					return (0,myfavorites)
913
					return (0,myfavorites)
914
				elif not "--oneshot" in self.myopts:
914
				elif not "--oneshot" in self.myopts:
915
					myfavorites.append(mykey)
915
					myfavorites.append(mykey)
Lines 943-949 class depgraph: Link Here
943
				sys.stderr.flush()
943
				sys.stderr.flush()
944
944
945
				try:
945
				try:
946
					self.mysd = self.select_dep(myroot, mykey, arg=x, force_merge=("--noreplace" not in self.myopts))
946
					if "--noreplace" in self.myopts:
947
						arg = None
948
					else:
949
						arg = x
950
					self.mysd = self.select_dep(myroot, mykey, arg=arg)
947
				except portage_exception.MissingSignature, e:
951
				except portage_exception.MissingSignature, e:
948
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
952
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
949
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
953
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
Lines 996-1002 class depgraph: Link Here
996
					if curslot == myslot:
1000
					if curslot == myslot:
997
						return match
1001
						return match
998
1002
999
	def select_dep(self,myroot,depstring,myparent=None,arg=None,myuse=None,raise_on_missing=False,soft_deps=False,force_merge=False):
1003
	def select_dep(self,myroot,depstring,myparent=None,arg=None,myuse=None,raise_on_missing=False,soft_deps=False):
1000
		""" Given a depstring, create the depgraph such that all dependencies are satisfied.
1004
		""" Given a depstring, create the depgraph such that all dependencies are satisfied.
1001
		    myroot = $ROOT from environment, where {R,P}DEPENDs are merged to.
1005
		    myroot = $ROOT from environment, where {R,P}DEPENDs are merged to.
1002
		    myparent = the node whose depstring is being passed in
1006
		    myparent = the node whose depstring is being passed in
Lines 1187-1200 class depgraph: Link Here
1187
				#we are a dependency, so we want to be unconditionally added
1191
				#we are a dependency, so we want to be unconditionally added
1188
				hard_dep = not soft_deps and len(vardb.match(x)) == 0
1192
				hard_dep = not soft_deps and len(vardb.match(x)) == 0
1189
				if not self.create(selected_pkg[0:3], myparent,
1193
				if not self.create(selected_pkg[0:3], myparent,
1190
					myuse=selected_pkg[-1], hard_dep=hard_dep):
1194
					myuse=selected_pkg[-1], hard_dep=hard_dep, arg=arg):
1191
					return 0
1195
					return 0
1192
			else:
1196
			else:
1193
				#if mysource is not set, then we are a command-line dependency and should not be added
1197
				#if mysource is not set, then we are a command-line dependency and should not be added
1194
				#if --onlydeps is specified.
1198
				#if --onlydeps is specified.
1195
				if not self.create(selected_pkg[0:3], myparent,
1199
				if not self.create(selected_pkg[0:3], myparent,
1196
					addme=("--onlydeps" not in self.myopts),
1200
					addme=("--onlydeps" not in self.myopts),
1197
					myuse=selected_pkg[-1], force_merge=force_merge):
1201
					myuse=selected_pkg[-1], arg=arg):
1198
					return 0
1202
					return 0
1199
1203
1200
		if "--debug" in self.myopts:
1204
		if "--debug" in self.myopts:

Return to bug 147766