Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 9090 Details for
Bug 17027
Checking compilation options for installed packages using emerge
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to emerge in portage-2.0.46-r12
emerge.diff (text/plain), 3.43 KB, created by
Daniel Armyr
on 2003-03-07 09:13:59 UTC
(
hide
)
Description:
patch to emerge in portage-2.0.46-r12
Filename:
MIME Type:
Creator:
Daniel Armyr
Created:
2003-03-07 09:13:59 UTC
Size:
3.43 KB
patch
obsolete
>17c17 >< actions=["clean", "config", "help", "info", "prune", "rsync", "search", "sync", "system", "unmerge", "world", "inject", "regen", "depclean", "diff"] >--- >> actions=["clean", "config", "help", "info", "prune", "rsync", "search", "sync", "system", "unmerge", "world", "inject", "regen", "depclean"] >140,142c140 >< #if ("--pretend" in myopts) or (myaction=="search"): #REMOVED >< if ("--pretend" in myopts) or (myaction in ["search","diff"]): #INSERTED >< >--- >> if ("--pretend" in myopts) or (myaction=="search"): >1443,1528d1440 >< >< #INSERTED >< #Prints a list of packages, showing differences in compile-time options to the settings that would be used if >< #recompiled now. If an argument is supplied, it only displays packages of which the argument is a substring. >< #The location of the vardbtree is hardcoded because it is in the vardbiapi. >< #TODO: allow regular expressions as search arguments. >< elif "diff"==myaction: >< #If we were supplied with a search string >< if ( myfiles ): >< print "Scaning for packagenames including \"" + myfiles[0] + "\"." >< else: >< print "Scanning all packages." >< print >< >< #Set root for vardb >< myRoot = portage.root + "var/db/pkg/" >< #Get a list of the options currenty used to compile. >< currCFlags = portage.settings["CFLAGS"].split( " " ) >< >< #Scan through all categories >< try: >< categories = portage.listdir ( myRoot ) >< except OSError: >< print "Error opening catalogue " + myRoot + "." >< sys.exit(-1) >< >< categories.sort() >< for y in categories: >< #Scan through all packages, listing their flags >< try: >< pkgList = portage.listdir ( myRoot + y ) >< except OSError: >< pkgList = [] #In case there is a file in the /var/db/pkg/ >< pkgList.sort() >< for x in pkgList: >< #Check if this file satisfies search criteria >< #TODO: replace string.find by regular expression equiv. >< if ( not myfiles or string.find ( y + "/" + x, myfiles[0] ) >=0 ): >< #Print name of package >< print green("*") + y + "/" + x + ": " >< #Get info about package >< try: >< myCFlagsFile = open ( myRoot + y + "/" + x + "/CFLAGS", "r" ) >< except (IOError,OSError): >< print red( "Error opening CFLAGS file" ) >< print >< continue #Skip this package and go on to next one. >< >< #Read in file, stripping last char, which is a '\n' >< myCFlagsData = string.rstrip ( myCFlagsFile.readline() ) >< #Split data into separate options >< myCFlags = myCFlagsData.split( " " ) >< #Make a list of settings this package does not have >< myCFlagsLacking = "" >< for z in currCFlags: >< if ( not z in myCFlags ): >< myCFlagsLacking += ( z + " " ) >< >< #Make a list of settings this package has in excess >< myCFlagsExtra = "" >< for z in myCFlags: >< if ( not z in currCFlags ): >< myCFlagsExtra += ( z + " " ) >< >< #If settings match >< if ( not myCFlagsLacking and not myCFlagsExtra ): >< print blue("Up to date") >< >< #If there are differences >< else: >< #Print options >< print red("Lacks: ") + myCFlagsLacking >< print red("Excess: ") + myCFlagsExtra >< #Done displaying this package >< print >< #Close cflags file >< myCFlagsFile.close() >< #else: >< #Package does not match criteria. Do not show. >< #print y + "/" + x + " " + str( string.find( myfiles[0], y + "/" + x ) ) >< #End processing file. If no match then nothing done >< #End scanning packages >< #End scanning categories >< >< #/INSERTED ><
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 17027
:
9090
|
9091