Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 97335 Details for
Bug 16365
Emerge can't handle circular dependencies
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Ignore blockers on packages about to be updated
blockers.patch (text/plain), 4.28 KB, created by
Jason Stubbs (RETIRED)
on 2006-09-18 07:04:01 UTC
(
hide
)
Description:
Ignore blockers on packages about to be updated
Filename:
MIME Type:
Creator:
Jason Stubbs (RETIRED)
Created:
2006-09-18 07:04:01 UTC
Size:
4.28 KB
patch
obsolete
>diff -uNr portage.tree/bin/emerge portage/bin/emerge >--- portage.tree/bin/emerge 2006-09-19 23:03:20.000000000 +0000 >+++ portage/bin/emerge 2006-09-19 22:57:46.000000000 +0000 >@@ -655,16 +655,33 @@ > self.outdatedpackages=[] > self.mydbapi={} > self.mydbapi["/"] = portage.fakedbapi(settings=settings) >+ self.pkg_slots={"/" : {}} >+ allcpv = self.trees["/"]["vartree"].getallcpv() > if "empty" not in self.myparams or self.target_root != "/": >- for pkg in self.trees["/"]["vartree"].getallcpv(): >+ for pkg in allcpv: > self.mydbapi["/"].cpv_inject(pkg) >+ for pkg in allcpv: >+ myslot = self.trees["/"]["vartree"].dbapi.aux_get(pkg, ["SLOT"])[0] >+ mykey = portage.dep_getkey(pkg) >+ if mykey in self.pkg_slots["/"]: >+ self.pkg_slots["/"][mykey][myslot] = pkg >+ else: >+ self.pkg_slots["/"][mykey] = {myslot:pkg} > if self.target_root != "/": >+ self.pkg_slots[self.target_root] = {} >+ allcpv = self.trees[self.target_root]["vartree"].getallcpv() > self.mydbapi[self.target_root] = \ > portage.fakedbapi(settings=settings) > if "empty" not in self.myparams: >- for pkg in self.trees[self.target_root]["vartree"].getallcpv(): >+ for pkg in allcpv: > self.mydbapi[self.target_root].cpv_inject(pkg) >- >+ for pkg in allcpv: >+ myslot = self.trees[self.target_root]["vartree"].dbapi.aux_get(pkg, ["SLOT"])[0] >+ mykey = portage.dep_getkey(pkg) >+ if mykey in self.pkg_slots[self.target_root]: >+ self.pkg_slots[self.target_root][mykey][myslot] = pkg >+ else: >+ self.pkg_slots[self.target_root][mykey] = {myslot:pkg} > if "--usepkg" in self.myopts: > trees["/"]["bintree"].populate( > "--getbinpkg" in self.myopts, "--getbinpkgonly" in self.myopts) >@@ -719,14 +736,17 @@ > We need to check vardbapi as well as the current depgraph for it. > Blocks are fatal if buildpkgonly is set. """ > if addme and "--buildpkgonly" not in self.myopts and myparent: >- parent_root = myparent.split()[1] >- if self.mydbapi[parent_root].match(mykey) or \ >- self.trees[parent_root]["vartree"].dbapi.match(mykey): >- mybigkey.append(myparent.split()[2]) >- self.digraph.addnode(" ".join(mybigkey), myparent, soft_dep=soft_dep) >+ mybigkey[1] = myparent.split()[1] >+ self.digraph.addnode(" ".join(mybigkey), myparent, soft_dep=soft_dep) > return 1 > else: > mydbapi = self.trees[myroot][self.pkg_tree_map[mytype]].dbapi >+ myslot = mydbapi.aux_get(mykey, ["SLOT"])[0] >+ depkey = portage.dep_getkey(mykey) >+ if depkey in self.pkg_slots: >+ self.pkg_slots[myroot][depkey][myslot] = mykey >+ else: >+ self.pkg_slots[myroot][depkey] = {myslot : mykey} > > if myuse is None: > self.pkgsettings[myroot].setcpv(mykey) >@@ -975,6 +995,8 @@ > missing += 1 > print "Missing binary for:",xs[2] > >+ self.validate_blockers() >+ > # We're true here unless we are missing binaries. > return (not missing,myfavorites) > >@@ -1196,6 +1218,16 @@ > print "Exiting...",myparent > return 1 > >+ def validate_blockers(self): >+ all_blockers = [node for node in self.digraph.all_nodes() >+ if node.split()[0] == "blocks"] >+ for blocker in all_blockers: >+ mytype,myroot,mydep = blocker.split() >+ mykey = portage.dep_getkey(mydep) >+ if mykey not in self.pkg_slots[myroot] or \ >+ not portage.match_from_list(mydep, \ >+ self.pkg_slots[myroot][mykey].values()): >+ self.digraph.remove(blocker) > > def altlist(self, reversed=False): > mygraph=self.digraph.copy() >@@ -1264,6 +1296,8 @@ > except ValueError: > missing_atoms.append(mydep) > >+ self.validate_blockers() >+ > if world_problems: > print "\n!!! Problems have been detected with your world file" > print "!!! Please run "+green("emaint --check world")+"\n" >@@ -1442,16 +1476,14 @@ > addl=""+red("B")+" "+fetch+" " > resolved = self.trees[x[1]]["vartree"].resolve_key(x[2]) > print "["+x[0]+" "+addl+"]",red(resolved), >+ block_parents = ", ".join(self.digraph.parent_nodes(" ".join(x))) > if resolved!=x[2]: > if x[3]: >- print red("(\""+x[2]+"\" is blocking "+x[3]+")") >+ print red("(\""+x[2]+"\" is blocking "+block_parents+")") > else: > print red("(\""+x[2]+"\")") > else: >- if x[3]: >- print red("(is blocking "+x[3]+")") >- else: >- print >+ print red("(is blocking "+block_parents+")") > else: > if x[0] != "binary" and \ > "fetch" in portdb.aux_get(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16365
: 97335