rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
except KeyNotFound: | except (KeyNotFound, IOError): | def getPublicKey(self, keyId): # if we have this key cached, return it immediately if keyId in self.publicDict: return self.publicDict[keyId] |
findOpenPGPKey(server, keyId, self.pubRing) | try: findOpenPGPKey(server, keyId, self.pubRing) except OSError, e: if e.errno == 2: log.warning("Can't write to file: %s" % self.pubRing) return False raise | def getPublicKey(self, keyId): for server in self.repositoryMap.values(): findOpenPGPKey(server, keyId, self.pubRing) # decide if we found the key or not. keyRing = open(self.pubRing) keyRing.seek(0, SEEK_END) limit = keyRing.tell() keyRing.seek(0, SEEK_SET) seekKeyById(keyId, keyRing) found = keyRing.tell() != limit k... |
keyRing = open(self.pubRing) | try: keyRing = open(self.pubRing) except IOError: continue | def getPublicKey(self, keyId): for server in self.repositoryMap.values(): findOpenPGPKey(server, keyId, self.pubRing) # decide if we found the key or not. keyRing = open(self.pubRing) keyRing.seek(0, SEEK_END) limit = keyRing.tell() keyRing.seek(0, SEEK_SET) seekKeyById(keyId, keyRing) found = keyRing.tell() != limit k... |
os.execlp('gpg', 'gpg', '-q', '--no-tty', '--homedir', pubRingPath, '--no-greeting', '--no-secmem-warning', '--no-verbose', '--no-mdc-warning', '--no-default-keyring', '--keyring', pubRing.split('/')[-1], '--batch', '--no-permission-warning', '--keyserver', '%sgetOpenPGPKey?search=%s' % (server, keyId), '--keyserver-op... | try: os.execlp('gpg', 'gpg', '-q', '--no-tty', '--homedir', pubRingPath, '--no-greeting', '--no-secmem-warning', '--no-verbose', '--no-mdc-warning', '--no-default-keyring', '--keyring', pubRing.split('/')[-1], '--batch', '--no-permission-warning', '--keyserver', '%sgetOpenPGPKey?search=%s' % (server, keyId), '--keyserv... | def findOpenPGPKey(server, keyId, pubRing): pubRingPath = '/'.join(pubRing.split('/')[:-1]) # don't depend on repoMap entries ending with / if server[-1] != '/': server += '/' secringExists = False if 'secring.gpg' in os.listdir(pubRingPath): secringExists = True pid = os.fork() if pid == 0: # we don't care about an... |
writeperm, capped, admin, canRemove = remove) | writeperm, capped, admin, remove = remove) | def addPerm(self, auth, group, label, trove, writeperm, capped, admin, remove): writeperm = (writeperm == "on") capped = (capped == "on") admin = (admin == "on") remove = (remove== "on") |
if filename in self.cacheMap: | if fileName in self.cacheMap: | def cacheFile(self, cfg, fileName, location): |
print "inserting" | def add(self, itemId, versionId, branchId, shortDesc, longDesc, urls, licenses, categories, language): cu = self.db.cursor() | |
if metadataId: metadataId = metadataId[0] else: return None | def get(self, itemId, versionId, branchId, language): cu = self.db.cursor() | |
classes, mdData = [x[0], x[1] for x in cu] | classes = [] mdData = [] for mdClass, data in cu: classes.append(str(mdClass)) mdData.append(data) | def get(self, itemId, versionId, branchId, language): cu = self.db.cursor() |
return item | if item: return item[0] else: return None | def getLatestVersion(self, itemId, branchId): cu = self.db.cursor() cu.execute("""SELECT Versions.version FROM Versions JOIN Metadata ON Metadata.versionId=Versions.versionId JOIN Branches ON Metadata.branchId=Branches.branchId WHERE Metadata.itemId=? AND Metadata.branchId=? ORDER BY Metadata.timeStamp DESC LIMIT 1""",... |
markLine = "mark: %.0f " % (minMark,) | if minMark > 0: markLine = "mark: %.0f " % (minMark,) else: markLine = "" | def displayBundle(bundle): minMark = min([x[0] for x in bundle]) names = [x[1][0] for x in bundle] names.sort() oldVF = set([x[1][1] for x in bundle]) newVF = set([x[1][2] for x in bundle]) if len(oldVF) > 1 or len(newVF) > 1: # this bundle doesn't use common version/flavors # XXX: find out why? for now, return old sty... |
h.putrequest('POST', selector) | h.putrequest('POST', "http:" + url) | def open_http(self, url, data=None): """override this WHOLE FUNCTION to change |
h.putrequest('GET', selector) | h.putrequest('GET', "http:" + url) | def open_http(self, url, data=None): """override this WHOLE FUNCTION to change |
user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % xmlrpclib.__version__ | user_agent = "xmlrpclib.py/%s (www.pythonware.com modified by specifixinc.com)" % xmlrpclib.__version__ | def getrealhost(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] |
troveList += [ x for x in pkg.iterTroveList() ] | troveList += [ x for x in trove.iterTroveList() ] | def cookPackageObject(repos, cfg, recipeClass, newVersion, buildBranch, prep=True, macros={}): """ Turns a package recipe object into a change set. Returns the absolute changeset created, a list of the names of the packages built, and and a tuple with a function to call and its arguments, which should be called when th... |
self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") | cu = self.db.cursor() cu.execute("DROP TABLE Latest") | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) |
self.cu.execute("UPDATE Latest SET latestType=%d" % versionops.LATEST_TYPE_ANY) self.message("Updating the Latest table... 2/3") | cu.execute(""" insert into Latest (itemId, branchId, flavorId, versionId, latestType) select instances.itemid as itemid, nodes.branchid as branchid, instances.flavorid as flavorid, nodes.versionid as versionid, %d from ( select i.itemid as itemid, n.branchid as branchid, i.flavorid as flavorid, max(n.finalTimestamp) as... | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) |
self.message("Updating the Latest table... 3/3") | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) | |
and i.troveType == %d | and i.troveType = %d | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) |
self.message("Done updating the Latest table") | cu.execute("delete from provides where instanceId in " "(select instanceId from instances where troveType=?)", trove.TROVE_TYPE_REDIRECT) cu.execute("""select instanceId, item, version, flavor from instances join items using (itemId) join versions on instances.versionId = versions.versionId join flavors on instances.fl... | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) |
When a new section is discovered, a new sectionType of | When a new section is discovered, a new section with type | def includeConfigFile(self, val): for cfgfile in util.braceGlob(val): self.read(cfgfile, exception=True) |
elif info.startswith('file:'): info = info.split('file:', 1)[1].strip() | elif info.startswith('file:') and info[5:].strip()[0] == '/': info = info[5:].strip() | def _markManualRequirement(self, info, path, pkg, m): flags = [] if self._checkInclusion(info, path): if info[0] == '/': depClass = deps.FileDependencies elif info.startswith('file:'): info = info.split('file:', 1)[1].strip() depClass = deps.FileDependencies elif info.startswith('soname:'): if not m or m.name != 'ELF':... |
for spec in self.recipe.buildRequires) depSetList = [self.recipe.buildReqMap[spec].getRequires() for spec in self.recipe.buildRequires] | for spec in self.recipe.buildRequires if spec in self.recipe.buildReqMap) depSetList = [ self.recipe.buildReqMap[spec].getRequires() for spec in self.recipe.buildRequires if spec in self.recipe.buildReqMap ] | def postProcess(self): # first, get all the trove names in the transitive buildRequires # runtime dependency closure db = database.Database(self.recipe.cfg.root, self.recipe.cfg.dbPath) transitiveBuildRequires = set( self.recipe.buildReqMap[spec].getName() for spec in self.recipe.buildRequires) depSetList = [self.recip... |
fp = DecompressFileObj(fp) | fp = StringIO(zlib.decompress(fp.read())) | def open_http(self, url, data=None, ssl=False): """override this WHOLE FUNCTION to change |
def error(*args): | def error(msg, *args): | def error(*args): "Log an error" logger.error(*args) hdlr.error = True |
logger.error(*args) | m = "error: " + msg logger.error(m, *args) | def error(*args): "Log an error" logger.error(*args) hdlr.error = True |
def warning(*args): "Log a warning" logger.warning(*args) | def warning(msg, *args): "Log a warning" m = "warning: " + msg logger.warning(m, *args) | def warning(*args): "Log a warning" logger.warning(*args) |
def info(*args): | def info(msg, *args): | def info(*args): "Log an informative message" logger.info(*args) |
logger.info(*args) | m = "+ " + msg logger.info(m, *args) | def info(*args): "Log an informative message" logger.info(*args) |
def debug(*args): | def debug(msg, *args): | def debug(*args): "Log a debugging message" logger.debug(*args) |
logger.debug(*args) | m = "+ " + msg logger.debug(m, *args) | def debug(*args): "Log a debugging message" logger.debug(*args) |
logging.addLevelName(logging.WARNING, "warning:") logging.addLevelName(logging.ERROR, "error:") logging.addLevelName(logging.INFO, "+") logging.addLevelName(logging.DEBUG, "+") logger = logging.getLogger('conary') | logger = logging.getLogger(LOGGER_CONARY) | def emit(self, record): logging.StreamHandler.emit(self, record) |
formatter = logging.Formatter('%(levelname)s %(message)s') | formatter = logging.Formatter('%(message)s') | def emit(self, record): logging.StreamHandler.emit(self, record) |
troveList = [x for x in self.repServer.repos.iterAllTroveNames() if x.endswith(':source')] | troveList = [x for x in self.repServer.repos.iterAllTroveNames('') if x.endswith(':source')] | def metadataCmd(self, authToken, fields, troveName=None): troveList = [x for x in self.repServer.repos.iterAllTroveNames() if x.endswith(':source')] troveList.sort() |
revocationTime = pubKey.getTimestamp() if revocationTime and revocationTime < timestamp: | expirationTime = pubKey.getTimestamp() if expirationTime and expirationTime < timestamp: | def checkTroveSignatures(self, trv): keyCache = openpgpkey.getKeyCache() for fingerprint, timestamp, sig in trv.troveInfo.sigs.digitalSigs.iter(): pubKey = keyCache.getPublicKey(fingerprint) if pubKey.isRevoked(): raise openpgpfile.IncompatibleKey('Key %s is revoked' %pubKey.getFingerprint()) revocationTime = pubKey.ge... |
url = "https://%s:%s@%s/conary/" % \ (userInfo[0], userInfo[1], serverName) | url = "https://%s:%s@%s/conary/" % (quote(userInfo[0]), quote(userInfo[1]), serverName) | def _cleanseUrl(protocol, url): if url.find('@') != -1: return protocol + '://<user>:<pwd>@' + url.rsplit('@', 1)[1] return url |
s[2] = '%s:%s@' % userInfo + s[2] | s[2] = ('%s:%s@' % (quote(userInfo[0]), quote(userInfo[1]))) + s[2] | def _cleanseUrl(protocol, url): if url.find('@') != -1: return protocol + '://<user>:<pwd>@' + url.rsplit('@', 1)[1] return url |
ignorePrimaryPins = False)[0] | ignorePrimaryPins = False) | # def _resolveDependencies() begins here |
splittable = True | # def _updateChangeSet -- body starts here | |
splittable = False | # def _updateChangeSet -- body starts here | |
return newJob, splittable | return newJob | # def _updateChangeSet -- body starts here |
jobSet, splittable = self._updateChangeSet(itemList, uJob, keepExisting = keepExisting, recurse = recurse, updateMode = updateByDefault, useAffinity = useAffinity, ignorePrimaryPins = ignorePrimaryPins, forceJobClosure = forceJobClosure) | jobSet = self._updateChangeSet(itemList, uJob, keepExisting = keepExisting, recurse = recurse, updateMode = updateByDefault, useAffinity = useAffinity, ignorePrimaryPins = ignorePrimaryPins, forceJobClosure = forceJobClosure) | def updateChangeSet(self, itemList, keepExisting = False, recurse = True, resolveDeps = True, test = False, updateByDefault = True, callback = UpdateCallback(), split = False, sync = False, fromChangesets = [], checkPathConflicts = True, ignorePrimaryPins = True, resolveRepos = True): """ Creates a changeset to update ... |
if "TroveInfoTypeInstanceIdx" in db.tables["TroveInfo"]: | if "TroveInfoInstTypeIdx" in db.tables["TroveInfo"]: | def optSchemaUpdate(db): #do we have the index we need? if "TroveInfoTypeInstanceIdx" in db.tables["TroveInfo"]: return # we need to have write access try: cu = self.db.cursor() cu.execute("BEGIN IMMEDIATE") except sqlerrors.ReadOnlyDatabase: return else: self.db.rollback() # we have write access and we need the index ... |
cu = self.db.cursor() | cu = db.cursor() | def optSchemaUpdate(db): #do we have the index we need? if "TroveInfoTypeInstanceIdx" in db.tables["TroveInfo"]: return # we need to have write access try: cu = self.db.cursor() cu.execute("BEGIN IMMEDIATE") except sqlerrors.ReadOnlyDatabase: return else: self.db.rollback() # we have write access and we need the index ... |
self.db.rollback() | db.rollback() | def optSchemaUpdate(db): #do we have the index we need? if "TroveInfoTypeInstanceIdx" in db.tables["TroveInfo"]: return # we need to have write access try: cu = self.db.cursor() cu.execute("BEGIN IMMEDIATE") except sqlerrors.ReadOnlyDatabase: return else: self.db.rollback() # we have write access and we need the index ... |
itemId = '' | itemId = None | def addAcl(self, userGroup, trovePattern, label, write, capped, admin): cu = self.db.cursor() |
labelId = '' | labelId = None | def addAcl(self, userGroup, trovePattern, label, write, capped, admin): cu = self.db.cursor() |
timeDict = dict(zip(timesNeeded, trvs)) | timeDict = dict(zip([ x[0] for x in timesNeeded ], [ x.getVersion() for x in trvs ])) | def _getLocalTroves(troveList): if not self.localRep or not troveList: return [ None ] * len(troveList) |
if 'migrate' in argSet: sys.exit(0) | def addUser(netRepos, userName, admin = False, mirror = False): if os.isatty(0): from getpass import getpass pw1 = getpass('Password:') pw2 = getpass('Reenter password:') if pw1 != pw2: print "Passwords do not match." return 1 else: # chop off the trailing newline pw1 = sys.stdin.readline()[:-1] # never give anonymo... | |
grp = package.Package(fullName, newVersion, None) | grp = package.Package(fullName, nextVersion, None) | def cookGroupObject(repos, cfg, recipeClass, buildBranch, macros={}): """ Turns a group recipe object into a change set. Returns the absolute changeset created, a list of the names of the packages built, and and None (for compatibility with cookPackageObject). @param repos: Repository to both look for source files and... |
lastOnBranch = newVersion | lastOnBranch = version | def nextVersion(repos, troveName, versionStr, troveFlavor, currentBranch, binary = True, sourceName = None): """ Calculates the version to use for a newly built trove which is about to be added to the repository. @param repos: repository the trove will be part of @type repos: repository.AbstractRepository @param trove... |
return ('MONO_PATH=%(destdir)s%(libdir)s' | return ('MONO_PATH=%(destdir)s%(prefix)s/lib' | def _getmonodis(macros, recipe, path): # For bootstrapping purposes, prefer the just-built version if # it exists if os.access('%(destdir)s/%(monodis)s' %macros, os.X_OK): return ('MONO_PATH=%(destdir)s%(libdir)s' ' LD_LIBRARY_PATH=%(destdir)s%(libdir)s' ' %(destdir)s/%(monodis)s' %macros) elif os.access('%(monodis)s' ... |
raise ParseError, "Invaid %s dependency: %s" % (class_.tagName, s) | raise ParseError, "Invalid %s dependency: %s" % (class_.tagName, s) | def parseDep(class_, s): """ Parses a dependency string of this class and returns the result. Raises a ParseError on failure. """ if not class_.allowParseDep: raise ParseError, "Invalid dependency class %s" % class_.tagName match = class_.regexp.match(s) if match is None: raise ParseError, "Invaid %s dependency: %s" %... |
assert(self.timeStamp) | if not self.timeStamp: log.warning('freezeTimestamp() called on a Revision that has no timestamp') | def freezeTimestamp(self): |
if perms and mtime is not None: | if perms and mtime is None: | def __init__(self, perms = None, mtime = None, owner = None, group = None): if perms and mtime is not None: # allow us to to pass in a frozen InodeStream as the # first argument - mtime will be None in that case. streams.StreamSet.__init__(self, perms) else: streams.StreamSet.__init__(self) if perms: self.perms.set(per... |
%(path, newPackage.getVersion().asString(), | %(path, oldPackage.getVersion().asString(), | def _showChangeSet(repos, changeSet, oldPackage, newPackage): packageChanges = changeSet.iterNewPackageList() pkgCs = packageChanges.next() assert(util.assertIteratorAtEnd(packageChanges)) showOneLog(pkgCs.getNewVersion(), pkgCs.getChangeLog()) fileList = [ (x[0], x[1], True, x[2], x[3]) for x in pkgCs.getNewFileList... |
oldPath, oldfileId, fileCs) = fileList[pathId] | oldPath, oldFileId, filecs) = fileList[pathId] | def displayChangeSet(db, repos, cs, troveList, cfg, ls = False, tags = False, fullVersions=False, showChanges=False, all=False, deps=False, sha1s=False, ids=False): (troves, hasVersions) = getTroves(cs, troveList) if all: showChanges = ls = tags = fullVersions = deps = True if not (ls or tags or sha1s or ids): if hasV... |
logMe(1, "CREATE USERS...") | def createUsers(db): cu = db.cursor() commit = False if "Users" not in db.tables: cu.execute(""" CREATE TABLE Users ( userId INTEGER PRIMARY KEY, user STRING, salt BINARY, password STRING, CONSTRAINT Users_userId_uq UNIQUE(user) )""") commit = True if "UserGroups" not in db.table... | |
old = repos.getTrove(troveName, oldV, None) | old = repos.getTrove(troveName, oldV, deps.deps.DependencySet()) | def rdiff(repos, buildLabel, troveName, oldVersion, newVersion): if not troveName.endswith(":source"): troveName += ":source" new = repos.findTrove(buildLabel, troveName, None, versionStr = newVersion) if len(new) > 1: log.error("%s matches multiple versions" % newVersion) return new = new[0] newV = new.getVersion() ... |
cs = repos.createChangeSet([(troveName, (oldV, None), (newV, None), False)]) | cs = repos.createChangeSet([(troveName, (oldV, deps.deps.DependencySet()), (newV, deps.deps.DependencySet()), False)]) | def rdiff(repos, buildLabel, troveName, oldVersion, newVersion): if not troveName.endswith(":source"): troveName += ":source" new = repos.findTrove(buildLabel, troveName, None, versionStr = newVersion) if len(new) > 1: log.error("%s matches multiple versions" % newVersion) return new = new[0] newV = new.getVersion() ... |
_Thaw(DependencySet(), frz) | return _Thaw(DependencySet(), frz) | def ThawDependencySet(frz): _Thaw(DependencySet(), frz) |
_Thaw(Flavor(), frz) | return _Thaw(Flavor(), frz) | def ThawFlavor(frz): _Thaw(Flavor(), frz) |
self.remaining.append(tup) | self.remaining.append(troveTup) | def sortTroveVersion(self, troveTup, affinityTroves): name = troveTup[0] flavor = troveTup[2] if flavor is None and affinityTroves: if self.query[QUERY_REVISION_BY_BRANCH].hasName(name): self.remaining.append(tup) return self.query[QUERY_REVISION_BY_BRANCH].addQueryWithAffinity(troveTup, None, affinityTroves) elif self... |
if msg.args[1].args[0].startswith('421'): | response = msg.args[1].args[0] if isinstance(response, str) and response.startswith('421'): | def fetchURL(cfg, name, location): log.info('Downloading %s...', name) retries = 0 url = None while retries < 5: try: url = urllib2.urlopen(name) break except urllib2.HTTPError, msg: if msg.code == 404: _createNegativeCacheEntry(cfg, name, location) return None else: log.error('error downloading %s: %s', name, str(msg)... |
for troveSpec in troveSpecs: self.addQuery(troveSpec) | def findTroves(self, repos, troveSpecs, allowMissing=False): for troveSpec in troveSpecs: self.addQuery(troveSpec) | |
missing = {} for query in self.query.values(): query.findAll(repos, missing, finalMap) query.reset() if missing and not allowMissing: if len(missing) > 1: missingMsgs = [ missing[x] for x in troveSpecs if x in missing] raise repository.TroveNotFound, '%d troves not found:\n%s\n' \ % (len(missing), '\n'.join(x for x i... | while troveSpecs: | def findTroves(self, repos, troveSpecs, allowMissing=False): for troveSpec in troveSpecs: self.addQuery(troveSpec) |
findTroveMap = self.findTroves(repos, remaining, allowMissing) finalMap.update(findTroveMap) | for troveSpec in troveSpecs: self.addQuery(troveSpec) missing = {} for query in self.query.values(): query.findAll(repos, missing, finalMap) query.reset() if missing and not allowMissing: if len(missing) > 1: missingMsgs = [ missing[x] for x in troveSpecs if x in missing] raise repository.TroveNotFound, '%d troves n... | def findTroves(self, repos, troveSpecs, allowMissing=False): for troveSpec in troveSpecs: self.addQuery(troveSpec) |
def getUserMap(): | def getUserMap(self): | def getUserMap(): """ Dict mapping user names to tuples of C{(preferred_uid, groupname, preferred_groupid, homedir, comment, shell)} """ return self.recipe.usermap |
def getUserGroupMap(): | def getUserGroupMap(self): | def getUserGroupMap(): """ Reverse map from group name to user name for groups created as part of a user definition. """ return self.recipe.usergrpmap |
def getGroupMap(): | def getGroupMap(self): | def getGroupMap(): """ Dict mapping group names to preferred_groupid """ return self.recipe.groupmap |
def getSuppGroupMap(): | def getSuppGroupMap(self): | def getSuppGroupMap(): """ Dict mapping user names to C{(group, preferred_groupid)} tuples """ return self.recipe.suppmap |
log.warning("pacakge %s does not exist" % troveName) | log.warning("package %s does not exist" % troveName) | def createBranch(self, newBranch, where, troveName = None): |
lns.append("Group %s has unresolved dependencies:\n" % groupName) | lns.append("Group %s has unresolved dependencies:" % groupName) | def cookGroupObject(repos, cfg, recipeClass, sourceVersion, macros={}, targetLabel = None, alwaysBumpCount=False): """ Turns a group recipe object into a change set. Returns the absolute changeset created, a list of the names of the packages built, and and None (for compatibility with cookPackageObject). @param repos:... |
lns.append(name) | lns.append("\n" + name) | def cookGroupObject(repos, cfg, recipeClass, sourceVersion, macros={}, targetLabel = None, alwaysBumpCount=False): """ Turns a group recipe object into a change set. Returns the absolute changeset created, a list of the names of the packages built, and and None (for compatibility with cookPackageObject). @param repos:... |
if ignorePin: return ( False, ) * len(neededList) | def _lockedList(neededList, ignorePin): #if ignorePin: # return ( False, ) * len(neededList) | |
locked = _lockedList(neededTroveList, ignorePin) | if ignorePin and oldVersion: ignorePin = self.db.trovesArePinned( [ (trvName, oldVersion, oldFlavor ) ] )[0] else: ignorePin = False pinned = _lockedList(neededTroveList, ignorePin) | # def _mergeGroupChanges -- main body begins here |
oldIsPinned in itertools.izip(neededTroveList, locked): | oldIsPinned in itertools.izip(neededTroveList, pinned): | # def _mergeGroupChanges -- main body begins here |
tagInfo = tagInfoList.pop() if tagInfo.datasource == 'args': f.write("%s%s %s %s %s\n" % (pre, handler, updateType, updateClass, " ".join(sorted(hi.tagToFile[tagInfo])))) elif tagInfo.datasource == 'stdin': f.write("%s%s %s %s <<EOF\n" % (pre, handler, updateType, updateClass)) for filename in hi.tagToFile[tagInfo]: f.... | log.error('unknown datasource %s' %datasource) | def run(self, tagScript, root, preScript=False): if tagScript: if preScript: pre = "# " else: pre = "" |
command = (handler, updateType, updateClass) | def run(self, tagScript, root, preScript=False): if tagScript: if preScript: pre = "# " else: pre = "" | |
if tagInfo.datasource == 'args': command = [handler, updateType, updateClass] command.extend(sorted(hi.tagToFile[tagInfo])) elif tagInfo.datasource == 'stdin': command = (handler, updateType, updateClass) else: log.error('unknown datasource %s' %tagInfo.datasource) | if datasource == 'args': command.extend(sorted(hi.tagToFile[tagInfo])) if datasource not in ('multitag', 'args', 'stdin'): log.error('unknown datasource %s' %datasource) break | def run(self, tagScript, root, preScript=False): if tagScript: if preScript: pre = "# " else: pre = "" |
filename)) | fileName)) | def run(self, tagScript, root, preScript=False): if tagScript: if preScript: pre = "# " else: pre = "" |
log.error("%s failed", cmd[0]) | log.error("%s failed", command[0]) | def run(self, tagScript, root, preScript=False): if tagScript: if preScript: pre = "# " else: pre = "" |
def getUserGroups(self, label): return self.c[label].getUserGroups() | def addAcl(self, reposLabel, userGroup, trovePattern, label, write, capped, admin): if not label: label = "" else: label = self.fromLabel(label) | |
urlsFetched = 0 | def _getLocalTroves(troveList): if not self.localRep or not troveList: return [ None ] * len(troveList) | |
urlsFetched += len(sizes) | def _getLocalTroves(troveList): if not self.localRep or not troveList: return [ None ] * len(troveList) | |
if urlsFetched > 1 or internalCs: | if cs.oldPackages or cs.newPackages: | def _getLocalTroves(troveList): if not self.localRep or not troveList: return [ None ] * len(troveList) |
import lib lib.epdb.st() | def merge(self, otherCs): import lib lib.epdb.st() self.files.update(otherCs.files) self.primaryTroveList += otherCs.primaryTroveList | |
and new.contents.sha1() != old.contents.sha1(): | and ((new.contents.sha1() != old.contents.sha1()) or (not old.flags.isConfig() and new.flags.isConfig())): | def fileChangeSet(pathId, old, new): contentsHash = None diff = new.diff(old) if old and old.__class__ == new.__class__: if isinstance(new, files.RegularFile) and \ isinstance(old, files.RegularFile) \ and new.contents.sha1() != old.contents.sha1(): contentsHash = new.contents.sha1() elif isinstance(new, files... |
self.repServer.auth.add(user, password, write=write, admin=admin) | self.repServer.auth.addUser(user, password, write=write, admin=admin) | def addUserCmd(self, authToken, fields): user = fields["user"].value password = fields["password"].value if fields.has_key("write"): write = True else: write = False |
@boolFields(write = False, admin = False) | @boolFields(write = False, admin = False, remove = False) | def addUserForm(self, auth): return self._write("add_user") |
self.repServer.addAcl(self.authToken, 0, user, "", "", write, True, admin, canRemove = remove) | self.repServer.addAcl(self.authToken, 0, user, "", "", write, True, admin, remove = remove) | def addUser(self, auth, user, password, write, admin, remove): self.repServer.addUser(self.authToken, 0, user, password) self.repServer.addAcl(self.authToken, 0, user, "", "", write, True, admin, canRemove = remove) |
replaceFiles = argSet.has_key('keep-existing') | keepExisting = argSet.has_key('keep-existing') | def realMain(): argDef = {} cfgMap = {} cfgMap["build-label"] = "buildLabel" cfgMap["install-label"] = "installLabel" cfgMap["root"] = "root" argDef["all"] = 0 argDef["config"] = 2 argDef["debug"] = 0 argDef["debug-exceptions"] = 0 argDef["full-versions"] = 0 argDef["ids"] = 0 argDef["info"] = 0 argDef["keep-existing... |
keywords = {'package': None} | def do(self, macros): """ Do the build action | |
if self.package: self.package = self.package % recipe.macros self.manifest = Manifest(package=self.package, recipe=recipe) | def __init__(self, recipe, *args, **keywords): | |
if self.package: self.manifest.walk() | def do(self, macros): """ | |
if self.package: self.manifest.create() | def do(self, macros): """ | |
keywords = {'component': None, 'package': None} | keywords = {'component': None} | def do(self, macros): BuildCommand.do(self, macros) # since we already did this, don't do it again in policy try: self.recipe.NormalizeLibrarySymlinks(exceptions=self.arglist) except AttributeError: pass |
self.package = self.package % recipe.macros | def __init__(self, recipe, *args, **keywords): BuildAction.__init__(self, recipe, *args, **keywords) # Add the specified package to the list of packages created by this # recipe if self.package: self.package = self.package % recipe.macros if ':' in self.package: self.component = self.package else: self.component = self... | |
candidateSha1sToRemove = [ x[1] for x in r ] | candidateSha1sToRemove = [ x[1] for x in r if x[1] is not None ] | def _removeTrove(self, name, version, flavor, markOnly = False): assert(not name.startswith('group-')) cu = self.db.cursor() cu.execute(""" SELECT instanceId, itemId, Instances.versionId, Instances.flavorId, troveType FROM Instances JOIN Items USING (itemId) JOIN Versions ON Instances.versionId = Versions.versionId JOI... |
kwargs['just-db'] = argSet.pop('just-db', False) | kwargs['justDatabase'] = argSet.pop('just-db', False) | def realMain(cfg, argv=sys.argv): argDef = {} cfgMap = {} cfgMap["build-label"] = "buildLabel" cfgMap["exclude-troves"] = "excludeTroves" cfgMap["root"] = "root" (NO_PARAM, ONE_PARAM) = (options.NO_PARAM, options.ONE_PARAM) (OPT_PARAM, MULT_PARAM) = (options.OPT_PARAM, options.MULT_PARAM) argDef["all"] = NO_PARAM ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.