diff -u -r1.177 emerge --- emerge 2003/01/15 22:57:42 1.177 +++ emerge 2003/01/19 06:32:04 @@ -519,7 +519,7 @@ # on a package being present AND must be built after that package. if not self.select_dep(myroot,edepend["PDEPEND"]): return 0 - + return 1 def select_files(self,myfiles): @@ -606,16 +606,34 @@ xfrom = '(dependency required by '+green('"'+myparent.split()[2]+'"')+red(' ['+myparent.split()[0]+"])") alleb=portage.portdb.xmatch("match-all",x) if alleb: - if "--usepkgonly" not in myopts: - print "\n!!! "+red("all ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.") - if myparent: - print "!!! "+red(xfrom) - else: - print "\n!!! "+red("There are no packages available to satisfy: ")+green(xinfo) - print "!!! Either add a suitable binary package or compile from an ebuild." + # when satifying dependencies, see if any matchable version in alleb + # is already installed, that will allow things to proceed + if not arg: + vardbapi=portage.db[myroot]["vartree"].dbapi + + while alleb: + cand=portage.portdb.xmatch("bestmatch-list",x,mylist=alleb) + if not cand: + break + if vardbapi.cpv_exists(cand): + # installed, allow this to satisfy dep + myeb=cand + break + alleb.remove(cand) + + if not myeb: + if "--usepkgonly" not in myopts: + print "\n!!! "+red("all ebuilds that could satisfy ")+green(xinfo)+red(" have been masked.") + if myparent: + print "!!! "+red(xfrom) + else: + print "\n!!! "+red("There are no packages available to satisfy: ")+green(xinfo) + print "!!! Either add a suitable binary package or compile from an ebuild." else: print "\nemerge: there are no masked or unmasked ebuilds to satisfy "+xinfo+"." - return 0 + + if not myeb: + return 0 if "--usepkg" in myopts: #If we want to use packages, see if we have a pre-built one...