Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 25688 Details for
Bug 41495
revdep-rebuild (and emerge -p) incorrectly order packages for an emerge.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
smart-update.py
smart-update.py (text/plain), 1.15 KB, created by
TGL
on 2004-02-15 14:20:45 UTC
(
hide
)
Description:
smart-update.py
Filename:
MIME Type:
Creator:
TGL
Created:
2004-02-15 14:20:45 UTC
Size:
1.15 KB
patch
obsolete
>#!/usr/bin/env python > >import sys,os >sys.path.insert(0, "/usr/lib/portage/pym") >from portage import catpkgsplit,pkgcmp,best,db > >portdbapi=db["/"]["porttree"].dbapi > >def get_slot(pkg): > return portdbapi.aux_get(pkg,["SLOT"])[0] > >def get_best_pkg(pkg): > psplit=catpkgsplit(pkg) > print psplit > #list the available pkgs > fulllist=portdbapi.match(psplit[0]+"/"+psplit[1]) > #keep only pkgs newer than pkg: > newerlist=filter((lambda p: pkgcmp(catpkgsplit(pkg)[1:], catpkgsplit(p)[1:]) <= 0), fulllist) > #try to return a good cpv... > if len(newerlist): > #sort by version > newerlist.sort(lambda p1,p2: pkgcmp(catpkgsplit(p1)[1:], catpkgsplit(p2)[1:])) > #get slot of the smallest version if any > pslot=get_slot(newerlist[0]) > #filter list to keep only packages from this slot > filteredlist=filter((lambda p: get_slot(p) == pslot), newerlist) > #return the best package available in this slot > return best(filteredlist) > #if no newer package wass available, simply return the best one > return best(fulllist) > > >if __name__ == "__main__": > for pkg in sys.argv[1:]: > try: print get_best_pkg(pkg) > except: > print >>sys.stderr, "Failed to find a matching package for",pkg > sys.exit(0)
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 Raw
Actions:
View
Attachments on
bug 41495
:
25565
|
25687
| 25688