rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
if path.endswith('.pm') or path.endswith('.pl'): self._addPerlDeps(path, m, pkg) | def doFile(self, path): | |
monodisPath = None | def _markProvides(self, path, fullpath, provision, pkg, m, f): if path not in pkg.providesMap: # BuildPackage only fills in providesMap for ELF files; we may # need to create a few more DependencySets. pkg.providesMap[path] = deps.DependencySet() | |
fullpath = macros.destdir + path | def doFile(self, path): | |
jobsToRemove = set() jobsToAdd = set() | jobsToRemove = [] jobsToAdd = [] transitiveClosureToRemove = [] | def _processRedirects(self, csSource, uJob, jobSet, transitiveClosure, recurse): """ Looks for redirects in the change set, and returns a list of troves which need to be included in the update. This returns redirectHack, which maps targets of redirections to the sources of those redirections. """ |
jobsToRemove.add(job) | jobsToRemove.append(job) else: transitiveClosureToRemove.append(job) | def _processRedirects(self, csSource, uJob, jobSet, transitiveClosure, recurse): """ Looks for redirects in the change set, and returns a list of troves which need to be included in the update. This returns redirectHack, which maps targets of redirections to the sources of those redirections. """ |
jobsToAdd.add(redirectJob) | jobsToAdd.append(redirectJob) | def _processRedirects(self, csSource, uJob, jobSet, transitiveClosure, recurse): """ Looks for redirects in the change set, and returns a list of troves which need to be included in the update. This returns redirectHack, which maps targets of redirections to the sources of those redirections. """ |
redirects = {} | # def _mergeGroupChanges -- main body begins here | |
newJob.add((info[0], (info[1], info[2]), (None, None), False)) | redirects.setdefault(info[0], []).append(info) for job in newJob: if job[0] in redirects: redirectList = redirects[job[0]] info = (job[0], job[1][0], job[1][1]) if info in redirectList: redirectList.remove(info) for troveList in redirects.itervalues(): for info in set(troveList): newJob.add((info[0], (info[1], info[2]... | # def _mergeGroupChanges -- main body begins here |
transitiveClosure.update(cs.getJobSet(primaries = False)) | transitiveClosure = set(cs.getJobSet(primaries = False)) | # def _updateChangeSet -- body starts here |
{ name : { cfg.buildLabel : None } }).get(name, []): | { name : { label : None } }).get(name, []): | def newTrove(repos, cfg, name, dir = None): parts = name.split('=', 1) if len(parts) == 1: label = cfg.buildLabel else: versionStr = parts[1] name = parts[0] try: label = versions.Label(versionStr) except versions.ParseError: log.error("%s is not a valid label" % versionStr) return name += ":source" # XXX this should ... |
def getrealhost(self, host): | def getrealhost(host): | def getrealhost(self, host): """ Slice off username/passwd and portnum """ atpoint = host.find('@') + 1 colpoint = host.rfind(':') if colpoint == -1: return host[atpoint:] else: return host[atpoint:colpoint] |
C{r.Requires([I{/path/to/file}, I{filterexp}] || [I{packagename:component[(FLAGS)]},] || [I{exceptions=filterexp)}])} | C{r.Requires([I{/path/to/file}, I{filterexp}] || [I{packagename:component[(FLAGS)]}, I{filterexp}] || [I{exceptions=filterexp)}])} | def _markProvides(self, path, fullpath, provision, pkg, m, f): if path not in pkg.providesMap: # BuildPackage only fills in providesMap for ELF files; we may # need to create a few more DependencySets. pkg.providesMap[path] = deps.DependencySet() |
troveSpecs = [ cmdline.parseTroveSpec(x, allowEmptyName=False) \ for x in troveSpecs ] | troveSpecs = [ cmdline.parseTroveSpec(x, allowEmptyName=False) for x in troveSpecs ] | def _merge(resultD, response): for troveName, troveVersions in response.iteritems(): d = resultD.setdefault(troveName, {}) for version, flavors in troveVersions.iteritems(): d.setdefault(version, []).extend(flavors) return resultD |
raise KeyError, theId | raise KeyError, itemId | def getTimeStamps(self, version, itemId): cu = self.db.cursor() cu.execute("""SELECT timeStamps FROM Nodes WHERE versionId=( |
def delTrove(self, name, version, flavor, missingOkay): | def delTrove(self, name, version, flavor, missingOkay, weakRef = False): | def delTrove(self, name, version, flavor, missingOkay): |
if key in self.strongTroves: | if weakRef and key in self.weakTroves: del self.weakTroves[key] elif not weakRef and key in self.strongTroves: | def delTrove(self, name, version, flavor, missingOkay): |
elif key in self.weakTroves: del self.troves[key] | def delTrove(self, name, version, flavor, missingOkay): | |
missingOkay = redundantOkay) | missingOkay = redundantOkay, weakRef = weakRef) | def mergeTroveListChanges(self, strongChangeList, weakChangeList, redundantOkay = False): """ Merges a set of changes to the included trove list into this trove. |
troveSetDiff(self.weakTroves, them.weakTroves, False) | troveSetDiff(self.weakTroves, them.weakTroves, True) | # def diff() begins here |
troveSetDiff(self.weakTroves, None, False) | troveSetDiff(self.weakTroves, None, True) | # def diff() begins here |
status=256 | def process(repos, cfg, commitList, srcMap, pkgMap, grpMap, argv, otherArgs): if not len(argv) and not len(otherArgs): return usage() argDef = { 'user': options.ONE_PARAM, 'sourceuser': options.ONE_PARAM, 'binaryuser': options.ONE_PARAM, 'from': options.ONE_PARAM, 'email': options.MULT_PARAM, } # create an argv[0] fo... | |
if (stat.S_ISREG(mode) and stat.S_ISREG(tmode) and 'abi' in m.contents and 'abi' in tm.contents | if (not stat.S_ISREG(mode) or not stat.S_ISREG(tmode)): return if ('abi' in m.contents and 'abi' in tm.contents | def doFile(self, path): |
linkedNodeLists = [self._getNodeListFromJobSet(x) | linkedNodeLists = [self._getNodeListFromJobSet(x, ignoreUnknown=True) | def _createDepGraph(self, result, brokenByErase, satisfied, linkedJobSets, criticalJobs, finalJobs, createCollectionEdges=False): # there are four kinds of edges -- old needs old, old needs new, # new needs new, and new needs old. Each edge carries a depId # to aid in cancelling them out. Our initial edge representatio... |
def _getNodeListFromJobSet(self, jobSet): | def _getNodeListFromJobSet(self, jobSet, ignoreUnknown=False): | def _getNodeListFromJobSet(self, jobSet): # convert from jobSet -> list of nodes nodeList = [] for job in jobSet: if job[1][0]: nodeId = self.oldInfoToNodeId[job[0], job[1][0], job[1][1]] else: nodeId = self.newInfoToNodeId[job[0], job[2][0], job[2][1]] nodeList.append(nodeId) return nodeList |
while self.hasId(id): | while self.hasId(str(id)): | def newId(self): id = 1 while self.hasId(id): id += 1 return id |
return id | return str(id) | def newId(self): id = 1 while self.hasId(id): id += 1 return id |
B{level} : By default, one level of initial subdirectory names is stripped out prior to applying the patch. The C{level} keyword allows specification of additional initial subdirectory levels to be removed. | B{level} : By default, conary attempts to patch the source using levels 1, 0, 2, and 3, in that order. The C{level} keyword can be given an integer value to resolve ambiguity, or if an even higher level is required. (This is the C{-p} option to the patch program.) | def do(self): |
@keyword level: Deprecated! By default, conary attempts to patch the source using 1,0,2,3 resolve levels. The C{level} keyword allows manual specification of the number of initial subdirectory levels to be removed, and is preserved only so that older recipes can be cooked without modification. | @keyword level: By default, conary attempts to patch the source using levels 1, 0, 2, and 3, in that order. The C{level} keyword can be given an integer value to resolve ambiguity, or if an even higher level is required. (This is the C{-p} option to the patch program.) | def __init__(self, recipe, *args, **keywords): |
log.info('patch %s did not apply with level %s!' % (f,patchlevel)) | log.info('patch %s did not apply with level %s' % (f,patchlevel)) | def patchme(self, patch, f, destDir, patchlevels): devnull = open('/dev/null', 'w') for patchlevel in patchlevels: patchArgs = [ 'nohup', 'patch', '-d', destDir, '-p%s'%patchlevel, ] if self.backup: patchArgs.extend(['-b', '-z', self.backup]) if self.extraArgs: patchArgs.extend(self.extraArgs) |
log.error('could not apply the patch to your build dir') | log.error('could not apply patch %s in directory %s', f, destDir) | def patchme(self, patch, f, destDir, patchlevels): devnull = open('/dev/null', 'w') for patchlevel in patchlevels: patchArgs = [ 'nohup', 'patch', '-d', destDir, '-p%s'%patchlevel, ] if self.backup: patchArgs.extend(['-b', '-z', self.backup]) if self.extraArgs: patchArgs.extend(self.extraArgs) |
log.info('the use of level= in addPatch has been deprecated. ' 'conary will now figure out the level needed without user input.') | def do(self): | |
SELECT data FROM Items JOIN Instances USING (itemId) JOIN Versions USING (versionId) JOIN Flavors ON Instances.flavorId = Flavors.flavorId JOIN TroveInfo ON Instances.instanceId = TroveInfo.instanceId WHERE TroveInfo.infoType = ? AND item = ? AND version = ? AND flavor = ? """, trove._TROVEINFO_TAG_SIGS, name, version,... | SELECT TroveInfo.data FROM Items JOIN Instances USING (itemId) JOIN Versions USING (versionId) JOIN Flavors ON Instances.flavorId = Flavors.flavorId LEFT OUTER JOIN TroveInfo ON Instances.instanceId = TroveInfo.instanceId AND TroveInfo.infoType = ? WHERE item = ? AND version = ? AND flavor = ? """, trove._TROVEINFO_TAG... | def getTroveSigs(self, authToken, clientVersion, infoList): if not self.auth.check(authToken, write = False, mirror = True): raise errors.InsufficientPermission self.log(2, infoList) cu = self.db.cursor() |
result.append(cu.next()[0]) | data = cu.fetchall()[0][0] if data is None: data = "" result.append(data) | def getTroveSigs(self, authToken, clientVersion, infoList): if not self.auth.check(authToken, write = False, mirror = True): raise errors.InsufficientPermission self.log(2, infoList) cu = self.db.cursor() |
raise errors.TroveMissing(name, version = version) | raise errors.TroveMissing(name, version = self.toVersion(version)) | def getTroveSigs(self, authToken, clientVersion, infoList): if not self.auth.check(authToken, write = False, mirror = True): raise errors.InsufficientPermission self.log(2, infoList) cu = self.db.cursor() |
return branchToCheck == sourceBranch or \ (branchToCheck != targetBranch and _isUphill(verToCheck, targetBranch)) | return branchToCheck == sourceBranch | def _needsRewrite(sourceBranch, targetBranch, verToCheck, kind): # if this version is for a referenced trove, we can be # sure that trove is being cloned as well, and so we always # need to rewrite its version. if kind == V_REFTRV: return True |
result = self._eval(item, self._showdata) | result = self._eval(arg, self._showdata) | def do_showdata(self, arg): result = self._eval(item, self._showdata) |
self.newFiles.append(fileId) | self.oldFiles.append(fileId) | def oldFile(self, fileId): |
self.oldfile(line[1:]) | self.oldFile(line[1:-1]) | def parse(self, line): |
troveCs = ts.getChangeSet(job) removedTroves.append(job) | cs = ts.getChangeSet(job) troveCs = cs.getNewTroveVersion(job[0], job[2][0], job[2][1]) if troveCs.troveType() == trove.TROVE_TYPE_REMOVED: removedTroves.append(job) | # def _updateChangeSet -- body starts here |
if flavorSpec is None: | if flavorSpec: flavorId = flavorIndices[flavorSpec] else: | def _setupTroveFilter(self, cu, troveSpecs, flavorIndices): self.log(3, troveSpecs, flavorIndices) schema.resetTable(cu, 'gtvlTbl') for troveName, versionDict in troveSpecs.iteritems(): if type(versionDict) is list: versionDict = dict.fromkeys(versionDict, [ None ]) |
else: flavorId = flavorIndices[flavorSpec] | def _setupTroveFilter(self, cu, troveSpecs, flavorIndices): self.log(3, troveSpecs, flavorIndices) schema.resetTable(cu, 'gtvlTbl') for troveName, versionDict in troveSpecs.iteritems(): if type(versionDict) is list: versionDict = dict.fromkeys(versionDict, [ None ]) | |
if self.debuginfo and m.name == 'ELF': | if self.debuginfo and m.name == 'ELF' and not path.endswith('.o'): | def doFile(self, path): |
if m.name == 'ar': | if m.name == 'ar' or path.endswith('.o'): | def doFile(self, path): |
def addPatch(self, file, level='0', backup='', keyid=None): | def addPatch(self, file, level='1', backup='', keyid=None): | def addPatch(self, file, level='0', backup='', keyid=None): |
self.dbg('ELF file %s found in config directory', filename) | self.info('ELF file %s found in config directory', filename) | def doFile(self, filename): m = self.recipe.magic[filename] if m and m.name == "ELF": # an ELF file cannot be a config file, some programs put # ELF files under /etc (X, for example), and tag handlers # can be ELF or shell scripts; we just want tag handlers # to be config files if they are shell scripts. # Just in case... |
self.dbg(filename) | self.info(filename) | def _markConfig(self, filename, fullpath): self.dbg(filename) f = file(fullpath) f.seek(0, 2) if f.tell(): # file has contents f.seek(-1, 2) lastchar = f.read(1) f.close() if lastchar != '\n': self.error("config file %s missing trailing newline" %filename) f.close() self.recipe.ComponentSpec(_config=filename) |
self.dbg(filename) | self.info(filename) | def doFile(self, filename): |
self.dbg('conary tag file: %s', file) | self.info('conary tag file: %s', file) | def doFile(self, file): |
self.dbg('conary tag handler: %s', file) | self.info('conary tag handler: %s', file) | def doFile(self, file): |
self.dbg('%s: %s', name, path) | self.info('%s: %s', name, path) | def markTag(self, name, tag, path, tagFile=None): # commonly, a tagdescription will nominate a file to be # tagged, but it will also be set explicitly in the recipe, # and therefore markTag will be called twice. if (len(tag.split()) > 1 or not tag.replace('-', '').replace('_', '').isalnum()): # handlers for multiple ta... |
self.dbg('ignoring tag match for %s: %s', | self.info('ignoring tag match for %s: %s', | def runInfo(self, path): for tag in self.included: for filt in self.included[tag]: |
self.dbg('ignoring tag match for %s: %s', name, path) | self.info('ignoring tag match for %s: %s', name, path) | def runInfo(self, path): for tag in self.included: for filt in self.included[tag]: |
self.dbg('suid/sgid: %s mode 0%o', path, mode & 07777) | self.info('suid/sgid: %s mode 0%o', path, mode & 07777) | def doFile(self, path): |
self.dbg('excluding directory %s with mode %o', path, mode&0777) | self.info('excluding directory %s with mode %o', path, mode&0777) | def doFile(self, path): |
self.dbg('excluding empty directory %s', path) | self.info('excluding empty directory %s', path) | def doFile(self, path): |
self.dbg('File %s is not a valid python file', path) | self.info('File %s is not a valid python file', path) | def _addPythonRequirements(self, path, fullpath, pkg, script=False): # FIXME: we really should check for python in destdir and shell # out to use that python to discover the dependencies if it exists. destdir = self.recipe.macros.destdir if self.sysPath is None: sysPath = [x for x in sys.path if x and os.path.exists(x)... |
self.dbg('Unable to find perl interpreter, disabling perl: requirements') | self.info('Unable to find perl interpreter,' ' disabling perl: requirements') | def _getPerlReqs(self, path, fullpath): if self.perlReqs is None: self._fetchPerl() if not self.perlPath: # no perl == bootstrap, but print warning self.dbg('Unable to find perl interpreter, disabling perl: requirements') self.perlReqs = False return [] # get the base directory where conary lives. In a checked # out v... |
self.dbg('ignoring requirement match for %s: %s', path, info) | self.info('ignoring requirement match for %s: %s', path, info) | def _checkInclusion(self, info, path): if info in self.excluded: for filt in self.excluded[info]: # exception handling is per-requirement, # so handled specially if filt.match(path): self.dbg('ignoring requirement match for %s: %s', path, info) return False return True |
for src in self._sources: | for src in self.getSourcePathList(): | def fetchAllSources(self, refreshFilter=None, skipFilter=None): |
return self._sources | return [ x for x in self._sources if isinstance(x, source._Source) ] | def getSourcePathList(self): return self._sources |
self.cu.execute('INSERT INTO Instances SELECT * FROM DBInstances') self.cu.execute('DROP TABLE DBInstances') | self.cu.execute("""INSERT INTO Instances (instanceId, troveName, versionId, flavorId, timeStamps, isPresent, pinned) SELECT instanceId, troveName, versionId, flavorId, timeStamps, isPresent, 0 FROM DBInstances """) | def migrate(self): # we don't alter here because lots of indices have changed # names; this is just easier self.cu.execute('DROP INDEX InstancesNameIdx') self.cu.execute('DROP INDEX InstancesIdx') createInstances(self.db) self.cu.execute('INSERT INTO Instances SELECT * FROM DBInstances') self.cu.execute('DROP TABLE DBI... |
schemaVersion = 8 | schemaVersion = 9 | def _doAnalyze(db): if sqlite3._sqlite.sqlite_version_info() <= (3, 2, 2): # ANALYZE didn't appear until 3.2.3 return # perform table analysis to help the optimizer doAnalyze = False cu = db.cursor() # if there are pending changes, just re-run ANALYZE if db.inTransaction: doAnalyze = True else: # check to see if the s... |
print 'foo', name | def _sosymlink(self, dirname, names): | |
print name | def _sosymlink(self, dirname, names): | |
FIXME: must test when we have a multilib platform! """ invariantinclusions = [ '*.\.(so.*|a)$', | FIXME: should limit itself to ELF objects once Filter evaluates magic """ invariantinclusions = [ '.*\.(so.*|a)$', | def doFile(self, path): |
target = util.joinPaths(self.dirmap[self.currentsubtree], basename) if os.path.exists(self.macros['destdir'] + os.sep + target): | targetdir = self.dirmap[self.currentsubtree %self.macros] target = util.joinPaths(targetdir, basename) destdir = self.macros['destdir'] if os.path.exists(destdir + os.sep + target): | def doFile(self, path): |
util.mkdirChain(self.macros['destdir'] + os.sep + self.macros['initdir']) util.rename(self.macros['destdir'] + path, self.macros['destdir'] + target) | util.mkdirChain(destdir + targetdir) util.rename(destdir + path, destdir + target) | def doFile(self, path): |
print "File sets can not be clone." | print "File sets cannot be cloned." | def _isUphill(ver, uphill): uphillBranch = uphill.branch() verBranch = ver.branch() if uphillBranch == verBranch: return True |
r'.*/fonts.(cache.*|dir|Scale)$', | r'.*/fonts.(cache.*|dir|scale)$', | def doFile(self, filename): source = util.joinPaths(self.builddir, filename) dest = util.joinPaths(self.destdir, filename) if os.path.exists(dest): return if not util.isregular(source): # will not be a directory, but might be a symlink or something return util.mkdirChain(os.path.dirname(dest)) shutil.copy2(source, dest... |
recipe.sourcemap(self.sourcename) | recipe.sourceMap(self.sourcename) | def __init__(self, recipe, *args, **keywords): |
raise TroveSpecError(specStr, "bad flavor spec") | raise TroveSpecError(origSpecStr, "bad flavor spec") | def parseTroveSpec(specStr, allowEmptyName = True): if specStr.find('[') > 0 and specStr[-1] == ']': specStr = specStr[:-1] l = specStr.split('[') if len(l) != 2: raise TroveSpecError(specStr, "bad flavor spec") specStr, flavorSpec = l flavor = deps.parseFlavor(flavorSpec) if flavor is None: raise TroveSpecError(specSt... |
raise TroveSpecError(specStr, "Too many ='s") | raise TroveSpecError(origSpecStr, "Too many ='s") | def parseTroveSpec(specStr, allowEmptyName = True): if specStr.find('[') > 0 and specStr[-1] == ']': specStr = specStr[:-1] l = specStr.split('[') if len(l) != 2: raise TroveSpecError(specStr, "bad flavor spec") specStr, flavorSpec = l flavor = deps.parseFlavor(flavorSpec) if flavor is None: raise TroveSpecError(specSt... |
raise TroveSpecError(specStr, 'Trove name is required') | raise TroveSpecError(origSpecStr, 'Trove name is required') | def parseTroveSpec(specStr, allowEmptyName = True): if specStr.find('[') > 0 and specStr[-1] == ']': specStr = specStr[:-1] l = specStr.split('[') if len(l) != 2: raise TroveSpecError(specStr, "bad flavor spec") specStr, flavorSpec = l flavor = deps.parseFlavor(flavorSpec) if flavor is None: raise TroveSpecError(specSt... |
print "Version = %s" % oldV.asString() | def annotate(repos, filename): try: state = SourceStateFromFile("CONARY") except OSError: return curVersion = state.getVersion() branch = state.getVersion().branch() label = branch.label() troveName = state.getName() # verList is in ascending order (first commit is first in list) labelVerList = repos.getTroveVersionsBy... | |
print "Switching to branch %s" % branch.asString() | def annotate(repos, filename): try: state = SourceStateFromFile("CONARY") except OSError: return curVersion = state.getVersion() branch = state.getVersion().branch() label = branch.label() troveName = state.getName() # verList is in ascending order (first commit is first in list) labelVerList = repos.getTroveVersionsBy... | |
db.eraseFile(self.key) | self.db.eraseFile(self.key) | def eraseVersion(self, version): |
self.configCache.update(otherCs.configCache) | configs = {} for (pathId, (contType, contents, compressed)) in \ otherCs.configCache.iteritems(): assert(not compressed) if contType == ChangedFileTypes.diff: self.configCache[pathId] = (contType, contents, compressed) else: configs[pathId] = (contType, contents, compressed) wrapper = DictAsCsf(otherCs.fileContents) ... | def merge(self, otherCs): self.files.update(otherCs.files) |
@type buildBranch: versions.Label | @type buildLabel: versions.Label | def cookObject(repos, cfg, recipeClass, buildLabel, changeSetFile = None, prep=True, macros={}, buildBranch = None, targetLabel = None, resume = None): """ Turns a recipe object into a change set, and sometimes commits the result. @param repos: Repository to both look for source files and file id's in. @type repos: re... |
for (row, returnVal, size) in cu: | for (row, returnVal, size) in cu.fetchall(): | def getEntry(self, item, recurse, withFiles, withFileContents, excludeAutoSource): (name, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute) = \ item |
dataSize = (ord(keyRing.read(1)) - 192 ) * 256 + \ | dataSize = (octet - 192 ) * 256 + \ | def readBlockSize(keyRing, packetType): if packetType == -1: return 0 # check if packet is old or new style dataSize = -1 if not packetType & 64: # RFC 2440 4.2.1 - Old-Format Packet Lengths if (packetType & 3) == OLD_PKT_LEN_ONE_OCTET: sizeLen = 1 elif (packetType & 3) == OLD_PKT_LEN_TWO_OCTET: sizeLen = 2 elif (packe... |
dataSize = 1 << (ord(keyRing.read(1)) & 0x1f) | dataSize = 1 << (octet & 0x1f) | def readBlockSize(keyRing, packetType): if packetType == -1: return 0 # check if packet is old or new style dataSize = -1 if not packetType & 64: # RFC 2440 4.2.1 - Old-Format Packet Lengths if (packetType & 3) == OLD_PKT_LEN_ONE_OCTET: sizeLen = 1 elif (packetType & 3) == OLD_PKT_LEN_TWO_OCTET: sizeLen = 2 elif (packe... |
changeset = otherArgs[2] | cspath = otherArgs[2] | def realMain(cfg, argv=sys.argv): argDef = {} cfgMap = {} cfgMap["build-label"] = "buildLabel" cfgMap["exclude-troves"] = "excludeTroves" cfgMap["root"] = "root" cfgMap["trust-threshold"] = "trustThreshold" (NO_PARAM, ONE_PARAM) = (options.NO_PARAM, options.ONE_PARAM) (OPT_PARAM, MULT_PARAM) = (options.OPT_PARAM, o... |
cs = changeset.ChangeSetFromFile(changeset) | cs = changeset.ChangeSetFromFile(cspath) | def realMain(cfg, argv=sys.argv): argDef = {} cfgMap = {} cfgMap["build-label"] = "buildLabel" cfgMap["exclude-troves"] = "excludeTroves" cfgMap["root"] = "root" cfgMap["trust-threshold"] = "trustThreshold" (NO_PARAM, ONE_PARAM) = (options.NO_PARAM, options.ONE_PARAM) (OPT_PARAM, MULT_PARAM) = (options.OPT_PARAM, o... |
debugExceptions = (CfgBool, True) debugRecipeExceptions = CfgBool | debugExceptions = (CfgBool, False) debugRecipeExceptions = (CfgBool, False) | def displayKey(self, cfgItem, value, out=None): if not value: return cfgItem.write(out, value, self._displayOptions) |
def __init__(self, value=None, name=None, showdefaults=True, ref=None, createOnAccess=False, required=True): | def __init__(self, value=None, name=None, showdefaults=True, parent=None, createOnAccess=False, required=True, track=False): | def __init__(self, value=None, name=None, showdefaults=True, ref=None, createOnAccess=False, required=True): |
self._ref = ref | self._parent = parent | def __init__(self, value=None, name=None, showdefaults=True, ref=None, createOnAccess=False, required=True): |
self._track = False | self._track = track | def __init__(self, value=None, name=None, showdefaults=True, ref=None, createOnAccess=False, required=True): |
self[key] = Flag(value=value, name=key, ref=self, createOnAccess=self._createOnAccess, required=self._required) | self[key] = Flag(value=value, name=key, parent=self, createOnAccess=self._createOnAccess, required=self._required, track=self._track) | def _override(self, key, value): if key in self: self[key]._set(bool(value)) else: # override flag values that haven't been entered yet self[key] = Flag(value=value, name=key, ref=self, createOnAccess=self._createOnAccess, required=self._required) |
def _addEquivalentFlagSets(self, other): | def _addEquivalentFlagSets(self, other, parent=None): | def _addEquivalentFlagSets(self, other): """ Add together two sets of flags or flag sets, assuming that the sets being added have the same name and context, and differ only in value or in child flags. """ assert(other._name == self._name) # RHS value (other) is propogated new = Flag(value=other._value, name=other._name... |
new = Flag(value=other._value, name=other._name) | new = Flag(value=other._value, name=other._name, parent=parent) | def _addEquivalentFlagSets(self, other): """ Add together two sets of flags or flag sets, assuming that the sets being added have the same name and context, and differ only in value or in child flags. """ assert(other._name == self._name) # RHS value (other) is propogated new = Flag(value=other._value, name=other._name... |
new[key] = self[key]._addEquivalentFlagSets(other[key]) | new[key] = self[key]._addEquivalentFlagSets(other[key], new) | def _addEquivalentFlagSets(self, other): """ Add together two sets of flags or flag sets, assuming that the sets being added have the same name and context, and differ only in value or in child flags. """ assert(other._name == self._name) # RHS value (other) is propogated new = Flag(value=other._value, name=other._name... |
return self._usedFlags | d = self._usedFlags.copy() for flagname, flag in self.iteritems(): for usedFlag, subflag in flag.getUsed().iteritems(): d['.'.join((flagname, usedFlag))] = subflag return d | def getUsed(self): return self._usedFlags |
def deepCopy(self, ref=None): | def deepCopy(self, parent=None): | def deepCopy(self, ref=None): """ Create a copy of a flag set, creating new Flag instances for all children """ new = Flag(value=self._value, name=self._name, showdefaults=self._showdefaults, ref=ref, createOnAccess=self._createOnAccess, required=self._required) new._overrides = self._overrides.copy() new._usedFlags = ... |
showdefaults=self._showdefaults, ref=ref, | showdefaults=self._showdefaults, parent=parent, | def deepCopy(self, ref=None): """ Create a copy of a flag set, creating new Flag instances for all children """ new = Flag(value=self._value, name=self._name, showdefaults=self._showdefaults, ref=ref, createOnAccess=self._createOnAccess, required=self._required) new._overrides = self._overrides.copy() new._usedFlags = ... |
required=self._required) | required=self._required, track=self._track) | def deepCopy(self, ref=None): """ Create a copy of a flag set, creating new Flag instances for all children """ new = Flag(value=self._value, name=self._name, showdefaults=self._showdefaults, ref=ref, createOnAccess=self._createOnAccess, required=self._required) new._overrides = self._overrides.copy() new._usedFlags = ... |
cursor = self._ref | cursor = self._parent | def asSet(self, *flags, **kw): """ Convert a flag to a flag set, containing only this flag. If any child flags are passed as arguments, a flag set is created containing this flag and the child flags """ # a) create a Flag with knowledge about this flag and its # parents (parents all set to none) |
child._ref = parent cursor = cursor._ref | child._parent = parent cursor = cursor._parent | def asSet(self, *flags, **kw): """ Convert a flag to a flag set, containing only this flag. If any child flags are passed as arguments, a flag set is created containing this flag and the child flags """ # a) create a Flag with knowledge about this flag and its # parents (parents all set to none) |
child._ref = parent | child._parent = parent | def asSet(self, *flags, **kw): """ Convert a flag to a flag set, containing only this flag. If any child flags are passed as arguments, a flag set is created containing this flag and the child flags """ # a) create a Flag with knowledge about this flag and its # parents (parents all set to none) |
top[flag] = Flag(value=True, name=flag, ref=top) | top[flag] = Flag(value=True, name=flag, parent=top) | def asSet(self, *flags, **kw): """ Convert a flag to a flag set, containing only this flag. If any child flags are passed as arguments, a flag set is created containing this flag and the child flags """ # a) create a Flag with knowledge about this flag and its # parents (parents all set to none) |
stringDeps = [] for flagset in useflagsets: for flag in flagset.iterkeys(): stringDeps.extend(flagset[flag].toDepStrings()) dep = deps.Dependency('use', stringDeps) set.addDep(deps.UseDependency, dep) stringDeps = [] | if useflagsets: stringDeps = [] for flagset in useflagsets: for flag in flagset.iterkeys(): stringDeps.extend(flagset[flag].toDepStrings()) dep = deps.Dependency('use', stringDeps) set.addDep(deps.UseDependency, dep) | def toDependency(self): """ Convert this flag set to a list of dependencies """ # XXX this code should probably disappear with the reworking of # flavors and their relationship with deps, but for now, # it is very handy set = deps.DependencySet() useflagsets = [] if self._name != '__GLOBAL__': self = self.asSet() if 'U... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.