rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
if buildVersion != clonedVer:
if clonedVer and buildVersion != clonedVer:
def _createBinaryVersions(versionMap, leafMap, repos, srcVersion, infoList): # this works on a single flavor at a time singleFlavor = list(set(x[2] for x in infoList)) assert(len(singleFlavor) == 1) singleFlavor = singleFlavor[0]
currentArch = [ deps.Dependency(baseArch) ]
currentArch = [[ deps.Dependency(baseArch) ]]
def initializeArch(): global currentArch localNamespace = globals() if localNamespace.has_key("flags_" + baseArch): currentArch = localNamespace["flags_" + baseArch]() del localNamespace
self.newTroves = [ x[1] for x in troveList ]
self.newTroves = [ x[2] for x in troveList ]
def __init__(self, db, changeSet, fsTroveDict, root, callback = None,
print "trace_cond <cond> [marker]"
print "trace_cond [marker] <cond>"
def do_trace_cond(self, args): args = args.split(' ', 1) if len(args) not in (1, 2): print "trace_cond <cond> [marker]" if len(args) == 1: cond = args[0] marker = 'default' else: marker, cond = args if cond == 'None': cond = None set_trace_cond(cond, marker) return try: cond = int(cond) set_trace_cond(cond, marker) ret...
set_trace_cond(cond, marker)
self.set_trace_cond(marker, cond)
def do_trace_cond(self, args): args = args.split(' ', 1) if len(args) not in (1, 2): print "trace_cond <cond> [marker]" if len(args) == 1: cond = args[0] marker = 'default' else: marker, cond = args if cond == 'None': cond = None set_trace_cond(cond, marker) return try: cond = int(cond) set_trace_cond(cond, marker) ret...
def set_trace_cond(klass, cond=None, marker='default'):
def set_trace_cond(klass, marker='default', cond=None):
def set_trace_cond(klass, cond=None, marker='default'): """ Sets a condition for set_trace statements that have the specified marker. A condition can either callable, in which case it should take one argument, which is the number of times set_trace(marker) has been called, or it can be a number, in which case the brea...
def set_trace_cond(cond=None, marker='default'):
def set_trace_cond(cond=None, **kw):
def set_trace_cond(cond=None, marker='default'): """ Sets a condition for set_trace statements that have the specified marker. A condition can either callable, in which case it should take one argument, which is the number of times set_trace(marker) has been called, or it can be a number, in which case the break will ...
Epdb.set_trace_cond(cond, marker)
for key, val in kw.iteritems(): Epdb.set_trace_cond(key, val) if not kw or cond is not None: Epdb.set_trace_cond('default', cond)
def set_trace_cond(cond=None, marker='default'): """ Sets a condition for set_trace statements that have the specified marker. A condition can either callable, in which case it should take one argument, which is the number of times set_trace(marker) has been called, or it can be a number, in which case the break will ...
if not packageVersions.has_key(name): packageVersions[name] = [] packageVersions[name].append((ver, newVer))
assert(not packageVersions.has_key(name)) packageVersions[name] = [ (ver, newVer) ]
def setTargetBranch(self, repos, targetBranchLabel):
if self.isLocal(): for (listMethod, addMethod) in [ (pkgCs.getChangedFileList, pkgCs.changedFile), (pkgCs.getNewFileList, pkgCs.newFile) ]: for (pathId, path, fileId, fileVersion) in listMethod(): if fileVersion != "-" and fileVersion.isLocal(): addMethod(pathId, path, newVer) oldVer = self.getFileOldVersion(pathId) cs...
for (listMethod, addMethod) in [ (pkgCs.getChangedFileList, pkgCs.changedFile), (pkgCs.getNewFileList, pkgCs.newFile) ]: for (pathId, path, fileId, fileVersion) in listMethod(): if fileVersion != "-" and fileVersion.isLocal(): addMethod(pathId, path, fileId, newVer) oldFileId = oldFileIdMap[fileId] csInfo = self.getFil...
def setTargetBranch(self, repos, targetBranchLabel):
for (troveName, depSet) in depList:
for (troveTup, depSet) in depList:
def resolveDependencies(self, uJob, jobSet, split = False, resolveDeps = True, useRepos = True): """ Determine and possibly resolve dependency problems. @param uJob: update job we are resolving dependencies for @type uJob: local.database.UpdateJob @param jobSet: jobs that are to be applied @type jobSet: list of job tup...
l = suggMap.setdefault(troveName, set())
l = suggMap.setdefault(troveTup, set())
def resolveDependencies(self, uJob, jobSet, split = False, resolveDeps = True, useRepos = True): """ Determine and possibly resolve dependency problems. @param uJob: update job we are resolving dependencies for @type uJob: local.database.UpdateJob @param jobSet: jobs that are to be applied @type jobSet: list of job tup...
pkgList = repos.findTrove(cfg.installLabel, troveName, cfg.flavor,
pkgList = repos.findTrove(cfg.installLabel, troveName, pkgList[0].getFlavor(),
def ChangeSetCommand(repos, cfg, troveName, outFileName, oldVersionStr, \ newVersionStr): pkgList = repos.findTrove(cfg.installLabel, troveName, cfg.flavor, newVersionStr) if len(pkgList) > 1: log.error("trove %s has multiple branches named %s", troveName, newVersionStr) newVersion = pkgList[0].getVersion() if (oldVe...
list = [(troveName, None, oldVersion, newVersion, (not oldVersion))]
list = [(troveName, pkgList[0].getFlavor(), oldVersion, newVersion, (not oldVersion))]
def ChangeSetCommand(repos, cfg, troveName, outFileName, oldVersionStr, \ newVersionStr): pkgList = repos.findTrove(cfg.installLabel, troveName, cfg.flavor, newVersionStr) if len(pkgList) > 1: log.error("trove %s has multiple branches named %s", troveName, newVersionStr) newVersion = pkgList[0].getVersion() if (oldVe...
cu.execute("""CREATE TABLE p (userId INTEGER,
cu.execute("""CREATE TABLE Permissions (userId INTEGER,
def __init__(self, dbpath, name, anonymousReads = False): self.name = name self.db = sqlite3.connect(dbpath) self.anonReads = anonymousReads self.reCache = {}
_checkDeps(jobSet, uJob.getTroveSource(),
_checkDeps(jobSet, troveSource,
# def _resolveDependencies() begins here
alwaysRecurse, installedPrimaries, installMissingRefs=False,
installedPrimaries, installMissingRefs=False,
def _mergeGroupChanges(self, uJob, primaryJobList, transitiveClosure, redirectHack, recurse, ineligible, checkPrimaryPins, alwaysRecurse, installedPrimaries, installMissingRefs=False, updateOnly=False, respectBranchAffinity=True, alwaysFollowLocalChanges=False):
if trove.troveIsCollection(item[0]): continue
if not trove.troveIsCollection(item[0]): continue
def _troveTransitiveClosure(db, itemList): itemQueue = util.IterableQueue() fullSet = set() for item in itertools.chain(itemList, itemQueue): if item in fullSet: continue fullSet.add(item)
(installedNotReferenced, installedAndReferenced, referencedNotInstalled) = self.db.db.getCompleteTroveSet(names)
(installedNotReferenced, installedAndReferenced, referencedStrong, referencedWeak) = self.db.db.getCompleteTroveSet(names)
# def _mergeGroupChanges -- main body begins here
True, {}, respectBranchAffinity, True)
True, {}, False, None, respectBranchAffinity, True)
# def _mergeGroupChanges -- main body begins here
(newInfo, isPrimary, byDefaultDict,
(newInfo, isPrimary, byDefaultDict, parentInstalled, branchHint,
# def _mergeGroupChanges -- main body begins here
childrenFollowLocalChanges = False
# def _mergeGroupChanges -- main body begins here
if replacedInfo in referencedNotInstalled:
if newInfo in alreadyReferenced: if replacedInfo in referencedNotInstalled: replaced = localUpdatesByMissing.get(replacedInfo, (None, None)) replacedInfo = (replacedInfo[0], replaced[0], replaced[1]) if replaced[0]: childrenFollowLocalChanges = True elif replacedInfo in referencedNotInstalled:
# def _mergeGroupChanges -- main body begins here
if replaced[0] is None and not isPrimary:
if (replaced[0] is None and not freshInstallOkay):
# def _mergeGroupChanges -- main body begins here
and replacedInfo in localUpdatesByPresent and replacedInfo in installedNotReferenced):
and replacedInfo in localUpdatesByPresent):
# def _mergeGroupChanges -- main body begins here
notInstalledBranch = replacedInfo[1].branch() localUpdateBranch = \
localUpdateBranch = replacedInfo[1].branch() notInstalledBranch = \
# def _mergeGroupChanges -- main body begins here
notInstalledBranch != newBranch): if isPrimary:
localUpdateBranch != newBranch): if (localUpdateBranch, newBranch) == branchHint: pass elif not respectBranchAffinity or isPrimary:
# def _mergeGroupChanges -- main body begins here
if not jobAdded and not alwaysRecurse: continue
if not recurseThis: continue
# def _mergeGroupChanges -- main body begins here
if info in ineligible and not alwaysRecurse: continue
# def _mergeGroupChanges -- main body begins here
byDefaultDict,
byDefaultDict, jobAdded, branchHint,
# def _mergeGroupChanges -- main body begins here
alwaysRecurse=True,
# def _updateChangeSet -- body starts here
cu.execute("""DELETE FROM Permissions WHERE userGroupId=? AND labelId=? AND itemId=?""", userGroupId, labelId, itemId) self.db.commit()
stmt = """DELETE FROM Permissions WHERE userGroupId=? AND (labelId=? OR (labelId IS NULL AND ? IS NULL)) AND (itemId=? OR (itemId IS NULL AND ? IS NULL))""" cu.execute(stmt, userGroupId, labelId, labelId, itemId, itemId) self.db.commit()
def deletePermission(self, userGroupId, labelId, itemId): cu = self.db.cursor() cu.execute("""DELETE FROM Permissions WHERE userGroupId=? AND labelId=? AND itemId=?""", userGroupId, labelId, itemId) self.db.commit()
self.recipe.ExcludeDirectories(exceptions=util.literalRegex(path))
self.recipe.ExcludeDirectories(exceptions=util.literalRegex(path).replace('%', '%%'))
def chmod(self, destdir, path, mode=None):
d = d %macros
def do(self, macros): for path in self.paths: path = path %macros dirs = util.braceExpand(path) for d in dirs:
self.setComponents(d)
self.setComponents(d.replace('%', '%%'))
def do(self, macros): for path in self.paths: path = path %macros dirs = util.braceExpand(path) for d in dirs:
fileid = sha1helper.hashString(path)
def __call__(self, path, flavor):
id = idx + startId
troveId = idx + startId
def addChangeSet(self, cs, includesFileContents = False): relative = []
self.depDb.add(startId, trvCs.getProvides(),
self.depDb.add(troveId, trvCs.getProvides(),
def addChangeSet(self, cs, includesFileContents = False): relative = []
self.idMap[startId] = info
self.idMap[troveId] = info
def addChangeSet(self, cs, includesFileContents = False): relative = []
if not dcfg.needTroves(): for ln in formatter.formatJobTups(jobs): print ln
def displayJobs(dcfg, formatter, jobs, prepare=True, jobNum=0, total=0): """ display the given list of jobs @param dcfg: stores information about the type of display to perform @type dcfg: display.DisplayConfig @param formatter: contains methods to display the troves @type formatter: display.TroveFormatter @param jobs...
pathId=? and versionId=?""", troveInstanceId, pathId, versionId)
fileId=? AND pathId=? AND versionId=?""", troveInstanceId, fileId, pathId, versionId)
def addFile(self, troveInfo, pathId, fileObj, path, fileId, fileVersion):
SELECT DISTINCT NewFiles.fileId, NewFiles.stream
SELECT DISTINCT NewFiles.fileId, MIN(NewFiles.stream)
def addTroveDone(self, troveInfo):
WHERE FileStreams.streamId is NULL
WHERE FileStreams.streamId is NULL GROUP BY fileId
def addTroveDone(self, troveInfo):
def displayTroves(cfg, troveSpecs=[], whatProvidesList=[],
def displayTroves(cfg, troveSpecs=[], pathList = [], whatProvidesList=[],
def displayTroves(cfg, troveSpecs=[], whatProvidesList=[], # query options versionFilter=VERSION_FILTER_LATEST, flavorFilter=FLAVOR_FILTER_BEST, pathList = [], useAffinity = False, # trove options info = False, digSigs = False, showDeps = False, showBuildReqs = False, # file options ls = False, lsl = False, ids = False...
flavorFilter=FLAVOR_FILTER_BEST, pathList = [],
flavorFilter=FLAVOR_FILTER_BEST,
def displayTroves(cfg, troveSpecs=[], whatProvidesList=[], # query options versionFilter=VERSION_FILTER_LATEST, flavorFilter=FLAVOR_FILTER_BEST, pathList = [], useAffinity = False, # trove options info = False, digSigs = False, showDeps = False, showBuildReqs = False, # file options ls = False, lsl = False, ids = False...
sorted(':'.join(x) for x in sorted(list(depLoops))))
' '.join(sorted(':'.join(x) for x in sorted(list(depLoops)))))
def warnMissing(missing): self.error('%s depends on missing %s', filterName, missing)
' specification file', fullname)
' specification file', fullpath)
def loadFilter(self, filterType, map, filename, fullpath): # do not load shared libraries desc = [x for x in imp.get_suffixes() if x[0] == '.py'][0] f = file(fullpath) modname = filename[:-3] m = imp.load_module(modname, f, fullpath, desc) f.close()
%s is not a symlink but probably should be a link to %s',
'%s is not a symlink but probably should be a link to %s',
def doFile(self, path):
'%(libdir)s/pkgconfig/')),
'%(libdir)s/pkgconfig/', '%(bindir)s/..*-config')),
def updateArgs(self, *args, **keywords):
elif version == 8:
if version == 8:
def __init__(self): self.r = deps.deps.DependencySet() self.p = deps.deps.DependencySet()
r.setLabelPath('myproject.rpath.org@rpl:1', 'conary.rpath.com@rpl:1')}
C{r.setLabelPath('myproject.rpath.org@rpl:1', 'conary.rpath.com@rpl:1')}
def setLabelPath(self, *path): """ NAME ====
os.write(pipe[1], patch)
fcntl.fcntl(pipe[1], fcntl.F_SETFD, 1) p2 = subprocess.Popen(patchArgs, stdin=pipe[0], stderr=devnull, shell=False) os.close(pipe[0]) offset=0 while len(patch[offset:]): offset += os.write(pipe[1], patch[offset:])
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)
p2 = subprocess.Popen(patchArgs, stdin=pipe[0], stderr=devnull, shell=False)
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)
slurppatch = os.pipe() p1 = subprocess.Popen([provides, f], stdout=slurppatch[1], shell=False) p1.wait() os.close(slurppatch[1])
pin = util.popen("%s '%s'" %(provides, f))
def do(self):
patch = os.fdopen(slurppatch[0]).read() % self.recipe.macros
patch = pin.read() % self.recipe.macros
def do(self):
patch = os.fdopen(slurppatch[0]).read()
patch = pin.read() pin.close()
def do(self):
r'%(libdir)s/python.*/site-packages/.*\.a$',
r'%(prefix)s/(lib|%(lib)s)/python.*/site-packages/.*\.a$',
def doFile(self, path): fullpath = self.macros.destdir + path
fsTrove.addFile(pathId, headPath, headFileVersion, headFileId)
fsTrove.addFile(pathId, finalPath, headFileVersion, headFileId)
def _singleTrove(self, repos, troveCs, changeSet, baseTrove, fsTrove, root, removalHints, flags):
return self.troveSource.resolveDependencies( self.installLabelPath[self.index], self.depList)
try: return self.troveSource.resolveDependencies( self.installLabelPath[self.index], self.depList) except repoerrors.OpenError, err: log.warning('Could not access %s for dependency resolution: %s' % ( self.installLabelPath[self.index], err)) results = {} for depSet in self.depList: results[depSet] = [ [] for x in depS...
def resolveDependencies(self): return self.troveSource.resolveDependencies( self.installLabelPath[self.index], self.depList)
if targetOs: macros['hostos'] = targetOs
if hostOs: macros['hostos'] = hostOs
def _setHostMacros(crossHost, macros): hostFlavor, vendor, hostOs = _parseArch(crossHost) if vendor: macros['hostvendor'] = vendor if targetOs: macros['hostos'] = targetOs
macros['hostarch'] = use.Arch._getMacro('targetarch')
def _setHostMacros(crossHost, macros): hostFlavor, vendor, hostOs = _parseArch(crossHost) if vendor: macros['hostvendor'] = vendor if targetOs: macros['hostos'] = targetOs
print 'Fixing absolute symlink %s to relative symlink %s' \
print 'Changing absolute symlink %s to relative symlink %s' \
def doFile(self, path):
def __init__(self, cfg, laReposCache, srcdirs, extraMacros={}): _AbstractPackageRecipe.__init__(self, cfg, laReposCache, srcdirs, extraMacros)
def __init__(self, cfg, laReposCache, srcdirs, extraMacros={}, crossCompile=None): _AbstractPackageRecipe.__init__(self, cfg, laReposCache, srcdirs, extraMacros, crossCompile)
def __init__(self, cfg, laReposCache, srcdirs, extraMacros={}): _AbstractPackageRecipe.__init__(self, cfg, laReposCache, srcdirs, extraMacros) self.destdirPolicy = [] self.packagePolicy = [] self.requires = [] self.infofilename = None self.realfilename = None
print " conary showcs <changeset>"
print " conary showcs <changeset> [trove[=<version>]]"
def usage(rc = 1): print "usage: conary changeset <pkg>[=[<oldver>--]<newver>]+ <outfile>" print " conary commit <changeset>" print " conary emerge <troveName>+" print " conary erase <pkgname>[=<version>]+" print " conary localcs <pkg> <outfile>" print " conary loca...
self.setUserGroupDep(path, user, deps.GroupInfoDependencies)
self.info('group %s: %s' % (group, path)) self.setUserGroupDep(path, group, deps.GroupInfoDependencies)
def _markItem(self, path, group): self.setUserGroupDep(path, user, deps.GroupInfoDependencies)
raise
if (isinstance(msg, policy.PolicyError) and not cfg.debugRecipeExceptions): print msg sys.exit(1) else: raise
def _cookPackageObject(repos, cfg, recipeClass, sourceVersion, prep=True, macros={}, resume = None, ignoreDeps=False, logBuild=False): """Builds the package for cookPackageObject. Parameter meanings are described there. """ fullName = recipeClass.name lcache = lookaside.RepositoryCache(repos) srcdirs = [ os.path.dir...
results[depSet] = [ [] for x in depList.iterDeps() ]
results[depSet] = [ [] for x in depSet.iterDeps() ]
def resolveDependencies(self, label, depList): results = {} for depSet in depList: results[depSet] = [ [] for x in depList.iterDeps() ] return results
results[depSet] = [ [] for x in depList.iterDeps() ]
results[depSet] = [ [] for x in depSet.iterDeps() ]
def resolveDependenciesByGroups(self, troveList, depList): results = {} for depSet in depList: results[depSet] = [ [] for x in depList.iterDeps() ] return results
f = util.findFile(file, self.srcdirs)
f = lookaside.findAll(self.cfg, self.laReposCache, file, self.name, self.srcdirs)
def unpackSources(self, builddir):
cd = ''
def unpackSources(self, builddir):
cd = 'cd %s;' %targetdir util.execute('%s %s %s | patch -d %s -p%s %s' %(cd, provides, f, destDir, level, backup))
destDir = "/".join((destDir, targetdir)) util.execute('%s %s | patch -d %s -p%s %s' %(provides, f, destDir, level, backup))
def unpackSources(self, builddir):
raise ParseError, ("%s:%s: configuration value '%s' unknown" % (self.file, self.lineno, key))
raise ParseError, ("%s:%s: configuration value '%s' unknown" % (file, self.lineno, key))
def configLine(self, line, file = "override"):
invariantinclusions = [ '.*[tT][eE][sS][tT].*/*',
invariantinclusions = [ '.*[tT][eE][sS][tT].*/.*',
def findRightFile(self, fullpath, fileName, dirList):
return ChangeSet.addFileContents(hash, repostitory.FileContentsFromChangeSet(cs, hash))
return ChangeSet.addFileContents(self, hash, repository.FileContentsFromChangeSet(self.absCS, hash))
def addFileContents(self, hash):
def __str__(self): return formatFlavor(self)
def isEmpty(self): return not(self.members)
def __str__(self): return formatFlavor(self)
if not mergeBase:
if mergeBase is None:
def mergeFlavor(flavor, mergeBase): """ Merges the given flavor with the mergeBase - if flavor doesn't contain use flags, then include the mergeBase's use flags. If flavor doesn't contain an instruction set, then include the mergeBase's instruction set(s) """ if flavor is None: return mergeBase if not mergeBase: retur...
return Dependency(self.name, diffFlags)
if not diffFlags: return None else: return Dependency(self.name, diffFlags)
def difference(self, other): diffFlags = self.flags.copy() for flag, value in other.flags.iteritems(): if flag in diffFlags and value == diffFlags[flag]: del diffFlags[flag] return Dependency(self.name, diffFlags)
assert(dep.__class__ == self.depClass)
assert(dep.__class__.__name__ == self.depClass.__name__)
def addDep(self, dep, mergeType = DEP_MERGE_TYPE_NORMAL): assert(dep.__class__ == self.depClass)
newDepClass.addDep(dep.intersection(other.members[tag])) return newDepClass
dep = dep.intersection(other.members[tag]) if dep is None: continue newDepClass.addDep(dep) found = True if found: return newDepClass return None
def intersection(self, other): newDepClass = self.__class__()
newDepClass.addDep(dep.difference(other.members[tag]))
diff = dep.difference(other.members[tag]) if diff is None: continue newDepClass.addDep(diff)
def difference(self, other): newDepClass = self.__class__()
return newDepClass
found = True if found: return newDepClass else: return None
def difference(self, other): newDepClass = self.__class__()
newDep.members[depClass.tag] = depClass.intersection(other.members[tag])
dep = depClass.intersection(other.members[tag]) if dep is None: continue newDep.members[depClass.tag] = dep
def intersection(self, other): newDep = DependencySet() for tag, depClass in self.members.iteritems(): if tag in other.members: newDep.members[depClass.tag] = depClass.intersection(other.members[tag]) return newDep
newDep.members[tag] = depClass.difference(other.members[tag])
dep = depClass.difference(other.members[tag]) if dep is not None: newDep.members[tag] = dep
def difference(self, other): newDep = DependencySet() for tag, depClass in self.members.iteritems(): if tag in other.members: newDep.members[tag] = depClass.difference(other.members[tag]) else: newDep.members[tag] = copy.deepcopy(depClass) return newDep
pfn = "/proc/%d/status" % os.getpid() lines = open(pfn).readlines() f = lines[10].split() return int(f[1])
return memusage()[0] def memusage(): pfn = "/proc/self/statm" line = open(pfn).readline() arr = [ 4 * int(x) for x in line.split()[:6] ] vmsize, vmrss, vmshared, text, lib, data = arr return vmsize, vmrss, vmshared, text, lib, data
def memsize(): pfn = "/proc/%d/status" % os.getpid() lines = open(pfn).readlines() f = lines[10].split() return int(f[1])
self.deleteGroup(user, False)
try: self.deleteGroup(user, False) except StopIteration, e: pass
def deleteUser(self, userId, user, commit = True): # Need to do a lot of stuff: # UserGroups, Users, and all ACLs
toRemove = dict(((x[0][0], None, None), x) for x in replaceSpecs) results = groupAsSource.findTroves(None, toRemove, allowMissing=True) troveTups = chain(*results.itervalues())
replaceSpecsByName.setdefault(troveSpec[0], []).append((troveSpec, ref)) for troveName, replaceSpecs in replaceSpecsByName.iteritems(): troveTups = toRemove.get((troveName, None, None), []) if not troveTups: continue allComponents = set() byDefault = False
def _componentMatches(troveName, compList): return ':' in troveName and troveName.split(':', 1)[1] in compList
byDefault = group.includeTroveByDefault(*troveTup) components = group.getComponents(*troveTup)
if allComponents is not None: components = group.getComponents(*troveTup) if not components: allComponents = None else: allComponents.update(components) byDefault = byDefault or group.includeTroveByDefault(*troveTup)
def _componentMatches(troveName, compList): return ':' in troveName and troveName.split(':', 1)[1] in compList
group.addTrove(newTup, True, byDefault, [])
group.addTrove(newTup, True, byDefault, allComponents)
def _componentMatches(troveName, compList): return ':' in troveName and troveName.split(':', 1)[1] in compList
fStr = str(f)
fStr = str(fStr)
def getTupleStrings(self, n, v, f): """ returns potentially shortened display versions and flavors for a trove tuple.
self.dbg('initial contents: %s', filename)
self.dbg(filename)
def doFile(self, filename):
def doFile(self, file): fullpath = self.macros.destdir + file
def doFile(self, filename): fullpath = self.macros.destdir + filename
def doFile(self, file):
m = self.recipe.magic[file]
m = self.recipe.magic[filename]
def doFile(self, file):
self.dbg('shared library: %s', file) self.recipe.autopkg.pathMap[file].tags.set("shlib")
self.dbg(filename) self.recipe.autopkg.pathMap[filename].tags.set("shlib")
def doFile(self, file):
if major:
if major is not None:
def majorMinor(self, major = None, minor = None):
if minor:
if minor is not None:
def majorMinor(self, major = None, minor = None):
class NoSuchUseFlagError(Exception):
class NoSuchUseFlagError(AttributeError):
def __repr__(self): return "%s: %s {%s}" % (self._name, self._value, ', '.join((repr(x) for x in self.values())))
class NoSuchArchFlagError(Exception):
class NoSuchArchFlagError(AttributeError):
def __str__(self): return """
class NoSuchSubArchFlagError(Exception):
class NoSuchSubArchFlagError(AttributeError):
def __str__(self): return """
raise NoSuchSubArchFlagError(self._parent._name, key)
raise NoSuchSubArchFlagError(self._name, key)
def _getNonExistantKey(self, key): if self._strictMode: raise NoSuchSubArchFlagError(self._parent._name, key) else: self._addFlag(key) return self[key]
self.edges[nodeId] = set()
self.edges.setdefault(nodeId, set())
def addNode(self, item): nodeId = self.data.getIndex(item) self.edges[nodeId] = set() return nodeId