[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [emerge] bin: now also use PACKAGE_IGNORES to generate dynamic options
From:       Patrick Spendrin <ps_ml () gmx ! de>
Date:       2015-08-31 22:58:33
Message-ID: E1ZWY25-0000uF-OX () scm ! kde ! org
[Download RAW message or body]

Git commit 3966ef71a6c20ecca3fca3f3f18d1843feb3a732 by Patrick Spendrin.
Committed on 31/08/2015 at 22:58.
Pushed by sengels into branch 'master'.

now also use PACKAGE_IGNORES to generate dynamic options

M  +4    -1    bin/emerge.py
M  +2    -2    bin/info.py
M  +2    -1    bin/options.py

http://commits.kde.org/emerge/3966ef71a6c20ecca3fca3f3f18d1843feb3a732

diff --git a/bin/emerge.py b/bin/emerge.py
index a38d343..5126343 100755
--- a/bin/emerge.py
+++ b/bin/emerge.py
@@ -278,8 +278,11 @@ def main( ):
                          help = "probing: emerge will only look which files it has \
to build according to the list of installed files and according to the dependencies \
of the package." )  parser.add_argument( "--list-file", action = "store",
                          help = "Build all packages from the csv file provided" )
+    _def = emergeSettings.get( "General", "EMERGE_OPTIONS", "" )
+    if _def == "": _def = []
+    else: _def = _def.split( ";" )
     parser.add_argument( "--options", action = "append",
-                         default = emergeSettings.get( "General", "EMERGE_OPTIONS", \
"" ).split( ";" ), +                         default = _def,
                          help = "Set emerge property from string <OPTIONS>. An \
example for is \"cmake.openIDE=1\" see options.py for more informations." )  \
parser.add_argument( "-z", "--outDateVCS", action = "store_true",  help = "if \
packages from version control system sources are installed, it marks them as out of \
                date and rebuilds them (tags are not marked as out of date)." )
diff --git a/bin/info.py b/bin/info.py
index ce20a4b..47c3de8 100644
--- a/bin/info.py
+++ b/bin/info.py
@@ -18,10 +18,10 @@ import VersionInfo
 
 class infoclass(object):
     """this module contains the information class"""
-    def __init__( self, parent, option_string=None):
+    def __init__( self, parent, optionList=[]):
         ### package options
         self.parent = parent
-        self.options = Options(option_string)
+        self.options = Options(optionList)
         self.versionInfo = VersionInfo.VersionInfo(self)
         self.targets = OrderedDict()
         self.archiveNames = OrderedDict()
diff --git a/bin/options.py b/bin/options.py
index 68f0b27..1b41f70 100644
--- a/bin/options.py
+++ b/bin/options.py
@@ -300,7 +300,8 @@ class Options(object):
         #### end of user configurable part
         self.__verbose = False
         self.__errors = False
-        self.__readFromList(emergeSettings.get( "General", "EMERGE_OPTIONS", ""))
+        self.__readFromList(emergeSettings.get( "General", "EMERGE_OPTIONS", \
"").split(" ")) +        self.__readFromList(["options.packages." + x.split('/')[-1] \
+ "=False" for x in emergeSettings.get( "Portage", "PACKAGE_IGNORES", \
"").split(";")])  self.readFromEnv()
         self.__readFromList(optionslist)
         portage.PortageInstance.ignores.update(self.packages.getPackageIgnores())


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic