Esempio n. 1
0
 def isBuild(self, pkg):
     pkgPath = os.path.join(self.dir, pkg)
     specFileName = os.path.join(pkgPath, pkg + '.spec')
     if os.path.exists(specFileName):
         srpmFileName = specParse.specParse(specFileName).getSrpmName()
         if os.path.exists(os.path.join(pkgPath, 'TO.Alter')):
             if self.alter:
                 if os.path.exists(os.path.join(DEFFILE.TOPDIR + '-Alter', 'SRPMS', srpmFileName)):
                     return False
                 else:
                     return True
             else:
                 return False
         elif os.path.exists(os.path.join(pkgPath, 'TO.Nonfree')):
             if self.nonfree:
                 if os.path.exists(os.path.join(DEFFILE.TOPDIR + '-Nonfree', 'SRPMS', srpmFileName)):
                     return False
                 else:
                     return True
             else:
                 return False
         elif os.path.exists(os.path.join(pkgPath, 'TO.Orphan')):
             if self.orphan:
                 if os.path.exists(os.path.join(DEFFILE.TOPDIR + '-Orphan', 'SRPMS', srpmFileName)):
                     return False
                 else:
                     return True
             else:
                 return False
         elif os.path.exists(os.path.join(pkgPath, '.SKIP')):
             return False
         else:
             if os.path.exists(os.path.join(DEFFILE.TOPDIR, 'SRPMS', srpmFileName)):
                 return False
             else:
                 return True
Esempio n. 2
0
 def __init__(self, pkg):
     self.pkg = pkg
     self.cwd = os.path.join(DEFFILE.PKGDIR, pkg)
     os.chdir(self.cwd)
     self.spec = specParse.specParse(os.path.join(self.cwd, pkg + '.spec'))
     self.createDirs()