def __init__(self, cfg): ConaryHelper.__init__(self, cfg) self._configDir = cfg.configPath self._newPkgFactory = 'managed-group' self._groupContents = cfg.groupContents # FIXME: autoLoadRecipes causes group versioning to go sideways # The group super class in the repository has a version defined, which # overrides the version from factory-version. This should probably be # considered a bug in factory-managed-group, but we don't need # autoLoadRecipes here anyway. self._ccfg.autoLoadRecipes = []
def _newpkg(self, pkgName): """ Wrap newpkg to add a group recipe since group recipes are required. """ recipeDir = ConaryHelper._newpkg(self, pkgName) recipe = '%s.recipe' % pkgName recipeFile = os.path.join(recipeDir, recipe) if not os.path.exists(recipeFile): className = util.convertPackageNameToClassName(pkgName) fh = open(recipeFile, 'w') fh.write(GROUP_RECIPE % {'className': className}) fh.close() self._addFile(recipeDir, recipe) return recipeDir
def __init__(self, cfg, ui, rmakeCfgFn=None, conaryCfg=None, rmakeCfg=None): self._cfg = cfg self._ui = ui if conaryCfg: self._ccfg = conaryCfg else: self._ccfg = conarycfg.ConaryConfiguration(readConfigFiles=False) self._ccfg.read(util.join(self._cfg.configPath, 'conaryrc')) self._ccfg.dbPath = ':memory:' self._ccfg.initializeFlavors() self._client = conaryclient.ConaryClient(self._ccfg) if self._cfg.saveChangeSets or self._cfg.sanityCheckChangesets: self._saveChangeSets = tempfile.mkdtemp( prefix=self._cfg.platformName, suffix='-import-changesets') else: self._saveChangeSets = False self._sanityCheckChangesets = self._cfg.sanityCheckChangesets self._sanityCheckCommits = self._cfg.sanityCheckCommits if rmakeCfg: self._rmakeCfg = rmakeCfg else: self._rmakeCfg = self._getRmakeConfig(rmakeCfgFn=rmakeCfgFn) self._helper = helper.rMakeHelper(buildConfig=self._rmakeCfg) self.cvc = Cvc(self._cfg, self._ccfg, self._formatInput, LocalDispatcher(self, 12)) self._asyncDispatcher = OrderedCommitDispatcher(self, 30) self._conaryhelper = ConaryHelper(self._cfg)