Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 125408 Details for
Bug 151653
prune (-P) removes all but the most recently installed slot
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
keep the highest version whenever possible
higest_version.patch (text/plain), 1.41 KB, created by
Zac Medico
on 2007-07-20 02:07:09 UTC
(
hide
)
Description:
keep the highest version whenever possible
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-07-20 02:07:09 UTC
Size:
1.41 KB
patch
obsolete
>Index: bin/emerge >=================================================================== >--- bin/emerge (revision 7313) >+++ bin/emerge (revision 7314) >@@ -4073,9 +4073,32 @@ > if y not in pkgmap[mykey]["selected"]: > pkgmap[mykey]["selected"].append(y) > numselected=numselected+len(mymatch) >- >+ elif unmerge_action == "prune": >+ if len(mymatch) == 1: >+ continue >+ best_version = mymatch[0] >+ best_slot = vartree.getslot(best_version) >+ best_counter = vartree.dbapi.cpv_counter(best_version) >+ for mypkg in mymatch[1:]: >+ myslot = vartree.getslot(mypkg) >+ mycounter = vartree.dbapi.cpv_counter(mypkg) >+ if (myslot == best_slot and mycounter > best_counter) or \ >+ mypkg == portage.best([mypkg, best_version]): >+ if myslot == best_slot: >+ if mycounter < best_counter: >+ # On slot collision, keep the one with the >+ # highest counter since it is the most >+ # recently installed. >+ continue >+ best_version = mypkg >+ best_slot = myslot >+ best_counter = mycounter >+ pkgmap[mykey]["protected"].append(best_version) >+ pkgmap[mykey]["selected"] = [mypkg for mypkg in mymatch \ >+ if mypkg != best_version] >+ numselected = numselected + len(pkgmap[mykey]["selected"]) > else: >- #unmerge_action in ["prune", clean"] >+ # unmerge_action == "clean" > slotmap={} > for mypkg in mymatch: > if unmerge_action=="clean":
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 151653
: 125408