diff --git a/utils/package.py b/utils/package.py index 21ecdc2..fd9aac4 100644 --- a/utils/package.py +++ b/utils/package.py @@ -19,6 +19,7 @@ def search(r_p): Description = "" Home_page = "" repository = "" + PortEnv = try: parametrs = ["HOMEPAGE", "IUSE","DESCRIPTION", "repository", "LICENSE"] #print(r_p) diff --git a/utils/parsePortage.py b/utils/parsePortage.py index caefe8e..0d52083 100644 --- a/utils/parsePortage.py +++ b/utils/parsePortage.py @@ -8,6 +8,8 @@ class PortageConfig(): self.TargetParse =['USE', 'USE_EXPAN', 'VIDEO_CARDS', 'ACCEPT_CHOSTS', 'ACCEPT_LICENSE','CCACHE_DIR', 'CCACHE_SIZE', 'EMERGE_DEFAULT_OPTS', 'CFLAGS', 'CXXFLAGS', 'MAKEOPTS'] self.MakeConfig={} + self.EnvPortaga ={} + super().__init__(self.run()) def getLines(self, filename): if os.path.exists(filename): with open (filename, 'r') as f: @@ -37,7 +39,7 @@ class PortageConfig(): elif StateBox == 'Null' and line.endswith('"'): #line.replace('"', "") self.MakeConfig[line.split('=')[0]] = line.split('="')[1].split(" ") - + self.EnvPortaga['make.conf'] = self.MakeConfig print(self.MakeConfig) def templParse(self, parm, res=false): @@ -49,6 +51,8 @@ class PortageConfig(): if res: print(self.MakeConfig[parm]) return self.MakeConfig[parm] + + self.EnvPortaga[pam] = self.MakeConfig[parm] def parsePackageUse(self): self.templParse('package.use') @@ -62,6 +66,13 @@ class PortageConfig(): def parsePackageKeywords(self): self.templParse('package.accept_keywords') + def run(): + self.parseMakeConf() + templParse('package.use', res=True) + templParse('package.mask', res=True) + templParse('package.unmask', res=True) + templParse('package.accept_keywords', res=True) + if __name__ == '__main__': Test = PortageConfig()