Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 15727 Details for
Bug 4698
emerge world or system does not update all slots
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for portage.py/emerge
bugs.4698.patch (text/plain), 8.37 KB, created by
Masatomo Nakano (RETIRED)
on 2003-08-07 22:15:35 UTC
(
hide
)
Description:
patch for portage.py/emerge
Filename:
MIME Type:
Creator:
Masatomo Nakano (RETIRED)
Created:
2003-08-07 22:15:35 UTC
Size:
8.37 KB
patch
obsolete
>--- emerge.org 2003-08-03 03:25:13.000000000 +0100 >+++ emerge 2003-08-08 06:02:14.000000000 +0100 >@@ -609,6 +609,9 @@ > # since our blocks doesn't match any installed packages, > # it doesn't apply to us and we can ignore it. > return 1 >+ if mytype=="multi": >+ self.digraph.addnode(string.join(mybigkey),myparent) >+ return 1 > if not myparent: > # command-line specified or part of a world list... > if ("self" not in myparams) or (("selective" in myparams) and vardbapi.cpv_exists(mykey)): >@@ -753,6 +756,7 @@ > vardbapi=portage.db[myroot]["vartree"].dbapi > > myslot=portage.portdb.aux_get(pkgver,["SLOT"])[0] >+ pkg=portage.dep_getkey(pkg) > alleb=portage.portdb.xmatch("match-all",pkg) > while alleb: > cand=portage.portdb.xmatch("bestmatch-list",pkg,mylist=alleb) >@@ -772,6 +776,7 @@ > print > print "Parent: ",myparent > print "Depstring:",depstring >+ multiflg=False > if not arg: > #processing dependencies > mycheck=portage.dep_check(depstring,self.mydbapi[myroot]) >@@ -780,13 +785,32 @@ > mymerge=mycheck[1] > else: > #we're processing a command-line argument; unconditionally merge it even if it's already merged >- mymerge=[depstring] >+ mymerge=portage.portdb.xmatch("slotmatch-visible",depstring) >+ if "--update" in myopts: >+ newmerge=[] >+ for x in mymerge: >+ myslot=portage.db["/"]["porttree"].dbapi.aux_get(x[1:],["SLOT"])[0] >+ if portage.db["/"]["vartree"].hasslot(x[1:], myslot): >+ newmerge.append(x) >+ mymerge=newmerge >+ >+ if "--update" not in myopts: >+ if len(mymerge)>1 and not myparent: >+ multiflg=True >+ > if "--debug" in myopts: > print "Candidates:",mymerge >+ >+ if not mymerge and not myparent: >+ print "\nemerge: there are no masked or unmasked ebuilds to satisfy "+arg+"." >+ return 0 >+ > for x in mymerge: > if x[0]=="!": > #add our blocker; it will be ignored later if necessary (if we are remerging the same pkg, for example) > myk=["blocks",myroot,x[1:]] >+ elif multiflg: >+ myk=["multi",myroot,x[1:]] > else: > #We are not processing a blocker but a normal dependency > myeb_pkg=None >@@ -929,6 +953,13 @@ > for x in sysdict.keys(): > mylist.append(sysdict[x]) > >+ newlist=[] >+ for x in mylist: >+ for y in portage.portdb.xmatch("slotmatch-visible",x): >+ myslot=portage.db["/"]["porttree"].dbapi.aux_get(y[1:],["SLOT"])[0] >+ if portage.db["/"]["vartree"].hasslot(y[1:], myslot): >+ newlist.append(y) >+ mylist=newlist > for mydep in mylist: > myeb=portage.portdb.xmatch("bestmatch-visible",mydep) > if not myeb: >@@ -995,6 +1026,7 @@ > > def display(self,mylist): > changelogs=[] >+ error=None > for x in mylist: > #print x > fetch=" " >@@ -1013,6 +1045,12 @@ > print red("(from pkg "+x[3]+")") > else: > print >+ elif x[0]=="multi": >+ error="multi" >+ addl=""+red("B")+" "+fetch+" " >+ resolved=portage.db[x[1]]["vartree"].resolve_key(x[2]) >+ myslot=portage.portdb.aux_get(x[2],["SLOT"])[0] >+ print "["+x[0]+" "+addl+"]",red(resolved),"["+myslot+"]" > else: > if x[3]=="nomerge": > continue >@@ -1026,13 +1064,16 @@ > if (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific(x[2]): > addl=" "+yellow("R")+fetch+" " > elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]): >- myoldbest=portage.best(portage.db[x[1]]["vartree"].dbapi.match(portage.pkgsplit(x[2])[0])) >- >- try: >- myoldslot=portage.db[portage.root]["vartree"].getslot(myoldbest) >- except: >- myoldslot=None > mynewslot=portage.portdb.aux_get(x[2],["SLOT"])[0] >+ mypkg=portage.catpkgsplit(x[2]) >+ myoldbest=portage.slotmatch(portage.db[x[1]]["vartree"].dbapi.match(portage.pkgsplit(x[2])[0]),mynewslot) >+ if myoldbest: >+ try: >+ myoldslot=portage.db[portage.root]["vartree"].getslot(myoldbest) >+ except: >+ myoldslot=None >+ else: >+ myoldslot=None > > addl=" "+fetch > if (myoldslot==mynewslot) and portage.pkgcmp(portage.pkgsplit(x[2]), portage.pkgsplit(myoldbest)) < 0: >@@ -1058,7 +1099,9 @@ > myoldbest=blue("["+myoldbest+"]") > > iuse="" >+ slot='' > if "--verbose" in myopts: >+ slot="["+portage.portdb.aux_get(x[2],["SLOT"])[0]+"]" > for ebuild_iuse in string.split(portage.portdb.aux_get(x[2],["IUSE"])[0], " "): > try: > if (portage.usesplit.index(ebuild_iuse) >= 0) : >@@ -1089,9 +1132,9 @@ > if (oldlp-len(myprint)) > 0: > myprint=myprint+" "*(oldlp-len(myprint)) > myprint=myprint+myoldbest >- myprint=myprint+darkgreen(" to "+x[1])+" "+iuse >+ myprint=myprint+darkgreen(" to "+x[1])+" "+slot+" "+iuse > else: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+darkgreen("to "+x[1])+" "+iuse >+ myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+darkgreen("to "+x[1])+" "+slot+" "+iuse > else: > if "--columns" in myopts: > myprint="["+x[0]+" "+addl+"] "+darkgreen(xs[0]) >@@ -1100,9 +1143,9 @@ > myprint=myprint+green(" ["+xs[1]+xs[2]+"] ") > if (oldlp-len(myprint)) > 0: > myprint=myprint+(" "*(oldlp-len(myprint))) >- myprint=myprint+myoldbest+" "+iuse >+ myprint=myprint+myoldbest+" "+slot+" "+iuse > else: >- myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+iuse >+ myprint="["+x[0]+" "+addl+"] "+darkgreen(x[2])+" "+myoldbest+" "+slot+" "+iuse > print myprint > > mysplit=portage.pkgsplit(x[2]) >@@ -1126,6 +1169,14 @@ > print > del mysplit > >+ if error: >+ if error=="multi": >+ print >+ print "You need to select one version" >+ print "Example, \"emerge ="+x[2]+"\"" >+ print "You can install both of them, if you emerge twice." >+ >+ > if "--changelog" in myopts: > print > for revision,text in changelogs: >@@ -1196,6 +1247,15 @@ > if ("--pretend" not in myopts): > sys.exit(1) > >+ if x[0]=="multi": >+ print "\n!!! Error: the "+x[2]+" package conflicts with another package." >+ print "!!! It is necessary to specify a version." >+ print "!!! Example, \"emerge ="+x[2]+"\"" >+ print "!!! Please use 'emerge --pretend' to determine packages." >+ print >+ if ("--pretend" not in myopts): >+ sys.exit(1) >+ > if ("--resume" in myopts): > # We're resuming. > print green("*** Resuming merge...") >--- portage.py.org 2003-08-02 22:43:47.000000000 +0100 >+++ portage.py 2003-08-08 03:58:15.000000000 +0100 >@@ -2679,6 +2679,41 @@ > p2=catpkgsplit(bestmatch)[1:] > return bestmatch > >+def slotmatch(mymatches,slot=None): >+ "accepts None arguments; assumes matches are valid." >+ >+ if mymatches==None: >+ return "" >+ if not len(mymatches): >+ return "" >+ >+ tmpmatch={} >+ for x in mymatches: >+ if slot: >+ myslot=db["/"]["vartree"].getslot(x) >+ else: >+ myslot=db["/"]["porttree"].dbapi.aux_get(x,["SLOT"])[0] >+ if not tmpmatch.has_key(myslot): >+ tmpmatch[myslot]=x >+ else: >+ p1=catpkgsplit(x)[1:] >+ p2=catpkgsplit(tmpmatch[myslot])[1:] >+ if pkgcmp(p1,p2)>0: >+ tmpmatch[myslot]=x >+ >+ if slot: >+ if tmpmatch.has_key(slot): >+ return tmpmatch[slot] >+ else: >+ return "" >+ >+ slotmatch=[] >+ for x in tmpmatch: >+ slotmatch.append("="+tmpmatch[x]) >+ >+ slotmatch.sort() >+ return slotmatch >+ > class portagetree: > def __init__(self,root="/",virtual=None,clone=None): > global portdb >@@ -3248,6 +3283,20 @@ > except: > pass > return "" >+ >+ def hasslot(self,mycatpkg,myslot): >+ "Has a slot for a catpkg; assume it exists." >+ mysplit=catpkgsplit(mycatpkg) >+ mydirlist=listdir(self.root+"var/db/pkg/"+mysplit[0]) >+ for x in mydirlist: >+ if x[:len(mysplit[1])+1]==mysplit[1]+"-": >+ slotfile=open(self.root+"var/db/pkg/"+mysplit[0]+"/"+x+"/SLOT","r") >+ slotvar=string.split(slotfile.readline())[0] >+ slotfile.close() >+ if (slotvar==myslot): >+ return 1 >+ >+ return 0 > > def hasnode(self,mykey): > """Does the particular node (cat/pkg key) exist?""" >@@ -3713,10 +3762,13 @@ > elif level=="match-all": > #match *all* visible *and* masked packages > myval=self.match2(mydep,mykey,self.cp_list(mykey)) >+ elif level=="slotmatch-visible": >+ #match *all* visible each SLOT >+ myval=slotmatch(self.xmatch("match-visible",None,mydep,mykey)) > else: > print "ERROR: xmatch doesn't handle",level,"query!" > raise KeyError >- if self.frozen and (level not in ["match-list","bestmatch-list"]): >+ if self.frozen and (level not in ["match-list","bestmatch-list","slotmatch-visible"]): > self.xcache[level][mydep]=myval > return myval >
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 4698
:
15446
|
15727
|
15866
|
16126