View | Details | Raw Unified
Collapse All | Expand All

(-) a/bin/emerge (-10 / +14 lines)
 Lines 679-685   class depgraph: Link Here 
					"--getbinpkg" in self.myopts,
					"--getbinpkg" in self.myopts,
					"--getbinpkgonly" in self.myopts)
					"--getbinpkgonly" in self.myopts)
	def create(self,mybigkey,myparent=None,addme=1,myuse=None,hard_dep=True,force_merge=False):
	def create(self,mybigkey,myparent=None,addme=1,myuse=None,hard_dep=True,arg=None):
		"""
		"""
		Fills the digraph with nodes comprised of packages to merge.
		Fills the digraph with nodes comprised of packages to merge.
		mybigkey is the package spec of the package to merge.
		mybigkey is the package spec of the package to merge.
 Lines 744-753   class depgraph: Link Here 
				    is always included and if in 'selective' mode package is already
				    is always included and if in 'selective' mode package is already
				    installed we skip merging it."""
				    installed we skip merging it."""
				if "self" not in self.myparams or \
				if "self" not in self.myparams or \
					("selective" in self.myparams and not force_merge and \
					("selective" in self.myparams and \
					vardbapi.cpv_exists(mykey)):
					not arg and vardbapi.cpv_exists(mykey)):
					merging=0
					merging=0
			elif "selective" in self.myparams and not force_merge and vardbapi.cpv_exists(mykey):
			elif "selective" in self.myparams and vardbapi.cpv_exists(mykey):
				merging=0
				merging=0
			""" If we aren't merging, perform the --newuse check.
			""" If we aren't merging, perform the --newuse check.
 Lines 886-892   class depgraph: Link Here 
					print colorize("BAD", "\n*** You need to adjust PKGDIR to emerge this package.\n")
					print colorize("BAD", "\n*** You need to adjust PKGDIR to emerge this package.\n")
					sys.exit(1)
					sys.exit(1)
				if not self.create(["binary", myroot, mykey],
				if not self.create(["binary", myroot, mykey],
					None, "--onlydeps" not in self.myopts, force_merge=("--noreplace" not in self.myopts)):
					None, "--onlydeps" not in self.myopts):
					return (0,myfavorites)
					return (0,myfavorites)
				elif not "--oneshot" in self.myopts:
				elif not "--oneshot" in self.myopts:
					myfavorites.append(mykey)
					myfavorites.append(mykey)
 Lines 909-915   class depgraph: Link Here 
					raise portage_exception.PackageNotFound(
					raise portage_exception.PackageNotFound(
						"%s is not in a valid portage tree hierarchy or does not exist" % x)
						"%s is not in a valid portage tree hierarchy or does not exist" % x)
				if not self.create(["ebuild", myroot, mykey],
				if not self.create(["ebuild", myroot, mykey],
					None, "--onlydeps" not in self.myopts, force_merge=("--noreplace" not in self.myopts)):
					None, "--onlydeps" not in self.myopts):
					return (0,myfavorites)
					return (0,myfavorites)
				elif not "--oneshot" in self.myopts:
				elif not "--oneshot" in self.myopts:
					myfavorites.append(mykey)
					myfavorites.append(mykey)
 Lines 943-949   class depgraph: Link Here 
				sys.stderr.flush()
				sys.stderr.flush()
				try:
				try:
					self.mysd = self.select_dep(myroot, mykey, arg=x, force_merge=("--noreplace" not in self.myopts))
					if "--noreplace" in self.myopts:
						arg = None
					else:
						arg = x
					self.mysd = self.select_dep(myroot, mykey, arg=arg)
				except portage_exception.MissingSignature, e:
				except portage_exception.MissingSignature, e:
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
 Lines 996-1002   class depgraph: Link Here 
					if curslot == myslot:
					if curslot == myslot:
						return match
						return match
	def select_dep(self,myroot,depstring,myparent=None,arg=None,myuse=None,raise_on_missing=False,soft_deps=False,force_merge=False):
	def select_dep(self,myroot,depstring,myparent=None,arg=None,myuse=None,raise_on_missing=False,soft_deps=False):
		""" Given a depstring, create the depgraph such that all dependencies are satisfied.
		""" Given a depstring, create the depgraph such that all dependencies are satisfied.
		    myroot = $ROOT from environment, where {R,P}DEPENDs are merged to.
		    myroot = $ROOT from environment, where {R,P}DEPENDs are merged to.
		    myparent = the node whose depstring is being passed in
		    myparent = the node whose depstring is being passed in
 Lines 1187-1200   class depgraph: Link Here 
				#we are a dependency, so we want to be unconditionally added
				#we are a dependency, so we want to be unconditionally added
				hard_dep = not soft_deps and len(vardb.match(x)) == 0
				hard_dep = not soft_deps and len(vardb.match(x)) == 0
				if not self.create(selected_pkg[0:3], myparent,
				if not self.create(selected_pkg[0:3], myparent,
					myuse=selected_pkg[-1], hard_dep=hard_dep):
					myuse=selected_pkg[-1], hard_dep=hard_dep, arg=arg):
					return 0
					return 0
			else:
			else:
				#if mysource is not set, then we are a command-line dependency and should not be added
				#if mysource is not set, then we are a command-line dependency and should not be added
				#if --onlydeps is specified.
				#if --onlydeps is specified.
				if not self.create(selected_pkg[0:3], myparent,
				if not self.create(selected_pkg[0:3], myparent,
					addme=("--onlydeps" not in self.myopts),
					addme=("--onlydeps" not in self.myopts),
					myuse=selected_pkg[-1], force_merge=force_merge):
					myuse=selected_pkg[-1], arg=arg):
					return 0
					return 0
		if "--debug" in self.myopts:
		if "--debug" in self.myopts: