Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 101349 Details for
Bug 154223
Old style virtuals cause confusing error messages if the old PROVIDE file is left
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
prevent old-style virtuals from making new-style virtuals invisible
new_virtuals.patch (text/plain), 3.14 KB, created by
Zac Medico
on 2006-11-06 11:27:01 UTC
(
hide
)
Description:
prevent old-style virtuals from making new-style virtuals invisible
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-11-06 11:27:01 UTC
Size:
3.14 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 4955) >+++ pym/portage.py (revision 4958) >@@ -849,6 +849,7 @@ > self.virtuals = {} > self.virts_p = {} > self.dirVirtuals = None >+ self._new_virtuals = {} > self.v_count = 0 > > # Virtuals obtained from the vartree >@@ -914,6 +915,7 @@ > self.prevmaskdict = copy.deepcopy(clone.prevmaskdict) > self.pprovideddict = copy.deepcopy(clone.pprovideddict) > self.dirVirtuals = copy.deepcopy(clone.dirVirtuals) >+ self._new_virtuals = copy.deepcopy(clone._new_virtuals) > self.treeVirtuals = copy.deepcopy(clone.treeVirtuals) > self.features = copy.deepcopy(clone.features) > else: >@@ -1591,6 +1593,9 @@ > virts = flatten(portage_dep.use_reduce(portage_dep.paren_reduce(provides), uselist=myuse.split())) > > cp = dep_getkey(mycpv) >+ if cp.startswith("virtual/"): >+ # Bridge new-style virtual into old-style. >+ virts.append(cp) > for virt in virts: > virt = dep_getkey(virt) > if not self.treeVirtuals.has_key(virt): >@@ -1829,8 +1834,22 @@ > ptVirtuals.setdefault(virt, []) > ptVirtuals[virt].append(cp) > >- return stack_dictlist([ptVirtuals, self.treeVirtuals, self.dirVirtuals]) >+ return stack_dictlist([ptVirtuals, self.treeVirtuals, self.dirVirtuals, >+ self._new_virtuals]) > >+ def add_new_virtuals(self, mydbapis): >+ """Scan for new-style virtuals and bridge them into the old-style.""" >+ new_virtuals = {} >+ for mydbapi in mydbapis: >+ for cpv in mydbapi.cpv_all(): >+ if cpv.startswith("virtual/"): >+ cp = dep_getkey(cpv) >+ new_virtuals[cp] = [cp] >+ self._new_virtuals = new_virtuals >+ # Make sure dirVirtuals and treeVirtuals are initialized. >+ self.getvirtuals() >+ self.virtuals = self.__getvirtuals_compile() >+ > def __delitem__(self,mykey): > self.modifying() > for x in self.lookuplist: >@@ -4651,6 +4670,9 @@ > if not mys: > mys = string.split(myprovide, "/") > myprovides += [mys[0] + "/" + mys[1]] >+ if mycpv.startswith("virtual/"): >+ # Bridge new-style virtual into old-style. >+ myprovides.append(dep_getkey(mycpv)) > return myprovides > except SystemExit, e: > raise >@@ -5231,6 +5253,8 @@ > l.sort() > return l > >+ cpv_all = cp_all >+ > def p_list(self,mycp): > d={} > for oroot in self.porttrees: >Index: bin/emerge >=================================================================== >--- bin/emerge (revision 4955) >+++ bin/emerge (revision 4958) >@@ -721,10 +721,15 @@ > self.edebug = 1 > self.spinner = spinner > self.pkgsettings = {} >- self.pkgsettings[self.target_root] = portage.config(clone=settings) >- if self.target_root != "/": >- self.pkgsettings["/"] = \ >- portage.config(clone=trees["/"]["vartree"].settings) >+ for myroot in self.trees: >+ self.pkgsettings[myroot] = portage.config( >+ clone=trees[myroot]["vartree"].settings) >+ mydbapis = [] >+ if "--usepkgonly" not in self.myopts: >+ mydbapis.append(trees[myroot]["porttree"].dbapi) >+ if "--usepkg" in self.myopts: >+ mydbapis.append(trees[myroot]["bintree"].dbapi) >+ self.pkgsettings[myroot].add_new_virtuals(mydbapis) > self.useFlags = {} > self.useFlags[self.target_root] = {} > if self.target_root != "/":
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 154223
:
101349
|
101354