rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def decompress(filename, dest=None, fn_only=False):
def decompress(filename, dest=None, fn_only=False, check_timestamps=False):
def decompress(filename, dest=None, fn_only=False): """take a filename and decompress it into the same relative location. if the file is not compressed just return the file""" out = dest if not dest: out = filename if filename.endswith('.gz'): ztype='gz' if not dest: out = filename.replace('.gz', '') elif filename.e...
8c6e00abb3511aa55dc43fe676d3a99730ac5ab7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/8c6e00abb3511aa55dc43fe676d3a99730ac5ab7/misc.py
''' Helper function to call _pkgRKNEVRAExcluded.
''' Helper function to call _pkgExcludedRKNEVRA.
def _pkgExcludedRKT(self, repo,pkgKey, pkgtup): ''' Helper function to call _pkgRKNEVRAExcluded. Takes a repo, pkgKey and a package tuple''' (n,a,e,v,r) = pkgtup return self._pkgExcludedRKNEVRA(repo, pkgKey, n,e,v,r,a)
e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b/sqlitesack.py
''' Helper function to call _pkgRKNEVRAExcluded.
''' Helper function to call _pkgExcludedRKNEVRA.
def _pkgExcludedRKD(self, repo,pkgKey, data): ''' Helper function to call _pkgRKNEVRAExcluded. Takes a repo, pkgKey and a dict of package data''' (n,a,e,v,r) = (data['name'], data['arch'], data['epoch'], data['version'], data['release']) return self._pkgExcludedRKNEVRA(repo, pkgKey, n,e,v,r,a)
e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b/sqlitesack.py
''' Helper function to call _pkgRKNEVRAExcluded.
''' Helper function to call _pkgExcludedRKNEVRA.
def _pkgExcluded(self, po): ''' Helper function to call _pkgRKNEVRAExcluded. Takes a package object. ''' return self._pkgExcludedRKT(po.repo, po.pkgKey, po.pkgtup)
e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/e0acaa87a2981b6c5aa6bbd3a80a7dc739e1f12b/sqlitesack.py
if flags and type(flags) == type(0):
if flags and (type(flags) == type(0) or type(flags) == type(0L)):
def formatRequire (name, version, flags): ''' Return a human readable requirement string (ex. foobar >= 2.0) @param name: requirement name (ex. foobar) @param version: requirent version (ex. 2.0) @param flags: binary flags ( 0010 = equal, 0100 = greater than, 1000 = less than ) ''' s = name if flags and type(flags) =...
a810a19804630b62620a9a943847fde34839e54d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a810a19804630b62620a9a943847fde34839e54d/miscutils.py
if count not in sorted_lists: sorted_lists[count] = [] sorted_lists[count].append((pkg, matchkeys, tagresults))
if pkg not in results_by_pkg: results_by_pkg[pkg] = [] results_by_pkg[pkg].append((matchkeys, tagresults))
def results2sorted_lists(tmpres, sorted_lists): for (po, count) in tmpres: # check the pkg for sanity # pop it into the sorted lists tmpkeys = set() tmpvalues = [] if count not in sorted_lists: sorted_lists[count] = [] for s in real_crit_lower: for field in fields: value = to_unicode(getattr(po, field)) if value and ...
b785ab635d4175f8b4c4f7f04448b87e7904ec2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b785ab635d4175f8b4c4f7f04448b87e7904ec2e/__init__.py
for item in sorted_lists.values(): for pkg, keys, values in item: if pkg not in results_by_pkg: results_by_pkg[pkg] = [] results_by_pkg[pkg].append((keys,values)) sorted_lists = {} for pkg in results_by_pkg: totkeys = [] totvals = [] for (keys, values) in results_by_pkg[pkg]: totkeys.extend(keys) totvals.extend(v...
def results2sorted_lists(tmpres, sorted_lists): for (po, count) in tmpres: # check the pkg for sanity # pop it into the sorted lists tmpkeys = set() tmpvalues = [] if count not in sorted_lists: sorted_lists[count] = [] for s in real_crit_lower: for field in fields: value = to_unicode(getattr(po, field)) if value and ...
b785ab635d4175f8b4c4f7f04448b87e7904ec2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b785ab635d4175f8b4c4f7f04448b87e7904ec2e/__init__.py
print x
print to_unicode(x.__str__())
def _out(x): print x
124279dea6a7a9d01a3db971cc46a71d897a0524 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/124279dea6a7a9d01a3db971cc46a71d897a0524/yumcommands.py
for error in msg.split('\n'):
for error in msg.splitlines():
def log_scriptlet_output(self, data, msg): """ Note that data can be either a real pkg. ... or not. """ if msg is None or not hasattr(self, '_tid'): return # Not configured to run
d75aed77b1bb5c866d564b99116d84561cb09ee1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/d75aed77b1bb5c866d564b99116d84561cb09ee1/history.py
if name is not None and name in self._pkgmatch_fails:
if name is not None and name in self._pkgname_fails:
def _search(self, name=None, epoch=None, ver=None, rel=None, arch=None): '''List of matching packages, to zero or more of NEVRA.''' if name is not None and name in self._pkgmatch_fails: return []
17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e/rpmsack.py
self._pkgmatch_fails.add(name)
self._pkgname_fails.add(name)
def _search(self, name=None, epoch=None, ver=None, rel=None, arch=None): '''List of matching packages, to zero or more of NEVRA.''' if name is not None and name in self._pkgmatch_fails: return []
17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e/rpmsack.py
self._pkgmatch_fails.add(name)
self._pkgname_fails.add(name)
def _search(self, name=None, epoch=None, ver=None, rel=None, arch=None): '''List of matching packages, to zero or more of NEVRA.''' if name is not None and name in self._pkgmatch_fails: return []
17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17f7ebdd2c0a7df34c31fd3dd5e87a988a46e38e/rpmsack.py
return syslog_module.LOG_USER
return _syslog_facility_map["USER"]
def syslogFacilityMap(facility): if type(facility) == int: return facility elif facility.upper() in _syslog_facility_map: return _syslog_facility_map[facility.upper()] elif (facility.upper().startswith("LOG_") and facility[4:].upper() in _syslog_facility_map): return _syslog_facility_map[facility[4:].upper()] return sy...
2d8c8f210292766cc5389ac5700c3fa7fe1c8342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2d8c8f210292766cc5389ac5700c3fa7fe1c8342/logginglevels.py
syslogformatter = logging.Formatter("yum: %(message)s")
def doLoggingSetup(debuglevel, errorlevel, syslog_ident=None, syslog_facility=None, syslog_device='/dev/log'): """ Configure the python logger. errorlevel is optional. If provided, it will override the logging level provided in the logging config file for error messages. debuglevel is optional. If provided, it will ov...
2d8c8f210292766cc5389ac5700c3fa7fe1c8342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2d8c8f210292766cc5389ac5700c3fa7fe1c8342/logginglevels.py
log_dev = syslog_device
def doLoggingSetup(debuglevel, errorlevel, syslog_ident=None, syslog_facility=None, syslog_device='/dev/log'): """ Configure the python logger. errorlevel is optional. If provided, it will override the logging level provided in the logging config file for error messages. debuglevel is optional. If provided, it will ov...
2d8c8f210292766cc5389ac5700c3fa7fe1c8342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2d8c8f210292766cc5389ac5700c3fa7fe1c8342/logginglevels.py
if os.path.exists(log_dev):
if os.path.exists(syslog_device):
def doLoggingSetup(debuglevel, errorlevel, syslog_ident=None, syslog_facility=None, syslog_device='/dev/log'): """ Configure the python logger. errorlevel is optional. If provided, it will override the logging level provided in the logging config file for error messages. debuglevel is optional. If provided, it will ov...
2d8c8f210292766cc5389ac5700c3fa7fe1c8342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2d8c8f210292766cc5389ac5700c3fa7fe1c8342/logginglevels.py
syslog = logging.handlers.SysLogHandler(log_dev) syslog.setFormatter(syslogformatter) filelogger.addHandler(syslog) if syslog_ident is not None or syslog_facility is not None: ident = syslog_ident or '' facil = syslog_facility or 'LOG_USER' syslog_module.openlog(ident, 0, syslogFacilityMap(facil))
facil = syslogFacilityMap(syslog_facility or "USER") syslog = logging.handlers.SysLogHandler(syslog_device, facil)
def doLoggingSetup(debuglevel, errorlevel, syslog_ident=None, syslog_facility=None, syslog_device='/dev/log'): """ Configure the python logger. errorlevel is optional. If provided, it will override the logging level provided in the logging config file for error messages. debuglevel is optional. If provided, it will ov...
2d8c8f210292766cc5389ac5700c3fa7fe1c8342 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/2d8c8f210292766cc5389ac5700c3fa7fe1c8342/logginglevels.py
foo.i386 will be compared"""
foo.i386 will be compared Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
def returnNewestByNameArch(self, naTup=None, patterns=None, ignore_case=False): """return list of newest packages based on name, arch matching this means(in name.arch form): foo.i386 and foo.noarch are not compared to each other for highest version only foo.i386 and foo.i386 will be compared""" raise NotImplementedErro...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
be compared to each other for highest version."""
def returnNewestByName(self, name=None, patterns=None, ignore_case=False): """return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
foo.i386 will be compared"""
foo.i386 will be compared. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
def returnNewestByNameArch(self, naTup=None, patterns=None, ignore_case=False): """return list of newest packages based on name, arch matching this means(in name.arch form): foo.i386 and foo.noarch are not compared to each other for highest version only foo.i386 and foo.i386 will be compared""" calr = self._computeAggr...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
be compared to each other for highest version."""
def returnNewestByName(self, name=None, patterns=None, ignore_case=False): """return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
foo.i386 will be compared"""
foo.i386 will be compared Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
def returnNewestByNameArch(self, naTup=None, patterns=None, ignore_case=False): """return list of newest packages based on name, arch matching this means(in name.arch form): foo.i386 and foo.noarch are not compared to each other for highest version only foo.i386 and foo.i386 will be compared""" highdict = {} # If naTup...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
be compared to each other for highest version."""
def returnNewestByName(self, name=None, patterns=None, ignore_case=False): """return list of newest packages based on name matching this means(in name.arch form): foo.i386 and foo.noarch will be compared to each other for highest version. Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """
Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64"""
def packagesNewestByName(pkgs): """ Does the same as PackageSack.returnNewestByName(). Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64 The last _two_ pkgs will be returned, not just one of them. """ newest = {} for pkg in pkgs: key = pkg.name # Can't use pkg.__cmp__ because it takes .arch into account cval = ...
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
""" Does the same as PackageSack.returnNewestByNameArch() """
""" Does the same as PackageSack.returnNewestByNameArch() The last _two_ pkgs will be returned, not just one of them."""
def packagesNewestByNameArch(pkgs): """ Does the same as PackageSack.returnNewestByNameArch() """ newest = {} for pkg in pkgs: key = (pkg.name, pkg.arch) if key in newest and pkg.verLE(newest[key]): continue newest[key] = pkg return newest.values()
0ac90c93ee164ea24951926e8b26ae897ec270af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0ac90c93ee164ea24951926e8b26ae897ec270af/packageSack.py
_RPMVERIFY_DIGEST = (1 << 0)
_RPMVERIFY_DIGEST = (1 << 0)
def __cmp__(self, other): if other is None: return 1 type2sort = {'type' : 1, 'symlink' : 2, 'checksum' : 3, 'size' : 4, 'user' : 4, 'group' : 5, 'mode' : 6, 'genchecksum' : 7, 'mtime' : 8, 'missing' : 9, 'permissions-missing' : 10, 'state' : 11, 'missingok' : 12, 'ghost' : 13} ret = cmp(type2sort[self.typ...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
for filetuple in fi: (fn, size, mode, mtime, flags, dev, inode, link, state, vflags, user, group, csum) = filetuple if patterns: matched = False for p in patterns: if fnmatch.fnmatch(fn, p): matched = True break if not matched: continue ftypes = [] if flags & rpm.RPMFILE_CONFIG: ftypes.append('configuration') if fla...
pfs = _RPMVerifyPackage(fi, csum_type, patterns, all) for pf in pfs: fn = pf.filename ftypes = list(pf.rpmfile_types) if pf.rpmfile_state != "normal": ftypes.append("state=" + pf.rpmfile_state)
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if flags & rpm.RPMFILE_MISSINGOK and fake_problems:
if 'missing ok' in pf.rpmfile_types and fake_problems:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if flags & rpm.RPMFILE_MISSINGOK and not all:
if 'missing ok' in pf.rpmfile_types and not all:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if flags & rpm.RPMFILE_GHOST and fake_problems:
if 'ghost' in pf.rpmfile_types and fake_problems:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if flags & rpm.RPMFILE_GHOST and not all:
if 'ghost' in pf.rpmfile_types and not all:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if os.path.lexists(fn):
if os.path.lexists(pf.filename):
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
my_st = os.lstat(fn)
my_st = os.lstat(pf.filename)
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if mode < 0: mode = (mode & 0xFFFF) ftype = _ftype(mode) my_ftype = _ftype(my_st.st_mode) if vflags & _RPMVERIFY_RDEV and ftype != my_ftype: prob = _PkgVerifyProb('type', 'file type does not match', ftypes) prob.database_value = ftype prob.disk_value = my_ftype problems.append(prob) if (ftype == "symlink" and m...
my_ftype = YUMVerifyPackageFile._ftype(my_st.st_mode) verify_dev = False if (pf.verify_dev and (pf.ftype.endswith("device") or my_ftype.endswith("device"))): verify_dev = True if verify_dev: if pf.ftype != my_ftype: prob = _PkgVerifyProb('type','file type does not match', ftypes) prob.database_value = pf.ftype prob.di...
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = fnl
prob.database_value = pf.readlink
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if my_ftype == "symlink" and ftype == "file":
if my_ftype == "symlink" and pf.ftype == "file":
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
my_st_size = os.stat(fn).st_size
my_st_size = os.stat(pf.filename).st_size
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if (check_content and vflags & _RPMVERIFY_MTIME and int(my_st.st_mtime) != int(mtime)):
if (check_content and pf.verify_mtime and int(my_st.st_mtime) != int(pf.mtime)):
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = mtime
prob.database_value = pf.mtime
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if check_perms and vflags & _RPMVERIFY_USER and my_user != user:
if check_perms and pf.verify_user and my_user != pf.user:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = user
prob.database_value = pf.user
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if (check_perms and vflags & _RPMVERIFY_GROUP and my_group != group):
if check_perms and pf.verify_group and my_group != pf.group:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = group
prob.database_value = pf.group
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if 'ghost' in ftypes: my_mode &= 0777
if 'ghost' in ftypes: my_mode &= 0777
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if check_perms and vflags & _RPMVERIFY_MODE and my_mode != mode:
if check_perms and pf.verify_mode and my_mode != pf.mode:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = mode
prob.database_value = pf.mode
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if fast and not problems and (my_st_size == size): vflags &= ~_RPMVERIFY_DIGEST
verify_digest = pf.verify_digest if fast and not problems and (my_st_size == pf.size): verify_digest = False if not pf.digest: verify_digest = False
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
((have_prelink and (vflags & _RPMVERIFY_FILESIZE) and (my_st_size != size)) or (csum and vflags & _RPMVERIFY_DIGEST))):
(verify_digest or (pf.verify_size and have_prelink and my_st_size != pf.size))): if pf.digest: digest_type = pf.digest[0] csum = pf.digest[0] + ':' + pf.digest[1] else: digest_type = csum_type csum = ''
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
my_csum = misc.checksum(csum_type, fn) gen_csum = True
my_csum = misc.checksum(digest_type, pf.filename) my_csum = digest_type + ':' + my_csum
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
gen_csum = False if csum and vflags & _RPMVERIFY_DIGEST and not gen_csum:
my_csum = None if pf.verify_digest and my_csum is None:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if gen_csum and my_csum != csum and have_prelink:
if my_csum != csum and have_prelink:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
p = Popen([prelink_cmd, "-y", fn],
p = Popen([prelink_cmd, "-y", pf.filename],
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
tcsum = misc.checksum(csum_type, fp)
tcsum = misc.checksum(digest_type, fp)
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if (csum and vflags & _RPMVERIFY_DIGEST and gen_csum and my_csum != csum):
if pf.verify_digest and my_csum != csum:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
if (check_content and vflags & _RPMVERIFY_FILESIZE and my_st_size != size):
if check_content and pf.verify_size and my_st_size != pf.size:
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
prob.database_value = size
prob.database_value = pf.size
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
os.stat(fn)
os.stat(pf.filename)
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
results[fn] = problems
results[pf.filename] = problems
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
self._persistdir = root + '/' + persistdir
if not os.path.normpath(persistdir).startswith(self.root): self._persistdir = root + '/' + persistdir else: self._persistdir = persistdir
def __init__(self, root='/', releasever=None, cachedir=None, persistdir='/var/lib/yum'): self.root = root self._idx2pkg = {} self._name2pkg = {} self._pkgnames_loaded = set() self._tup2pkg = {} self._completely_loaded = False self._pkgmatch_fails = set() self._provmatch_fails = set() self._simple_pkgtup_list = [] self....
f48b1d9f0ede0eae518f5b353ed9dda74dde6d7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/f48b1d9f0ede0eae518f5b353ed9dda74dde6d7c/rpmsack.py
self._cachedir = self.root + '/' + cachedir + "/installed/"
if not os.path.normpath(cachedir).startswith(self.root): self._cachedir = self.root + '/' + cachedir + "/installed/" else: self._cachedir = '/' + cachedir + "/installed/"
def setCacheDir(self, cachedir): """ Sets the internal cachedir value for the rpmdb, to be the "installed" directory from this parent. """ self._cachedir = self.root + '/' + cachedir + "/installed/"
f48b1d9f0ede0eae518f5b353ed9dda74dde6d7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/f48b1d9f0ede0eae518f5b353ed9dda74dde6d7c/rpmsack.py
def import_key_to_pubring(rawkey, keyid, cachedir=None, gpgdir=None):
def import_key_to_pubring(rawkey, keyid, cachedir=None, gpgdir=None, make_ro_copy=True):
def import_key_to_pubring(rawkey, keyid, cachedir=None, gpgdir=None): # FIXME - cachedir can be removed from this method when we break api if gpgme is None: return False if not gpgdir: gpgdir = '%s/gpgdir' % cachedir if not os.path.exists(gpgdir): os.makedirs(gpgdir) key_fo = StringIO(rawkey) os.environ['GNUPGHOME']...
3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py
if gpghome and os.path.exists(gpghome):
if gpghome: if not os.path.exists(gpghome): return False
def valid_detached_sig(sig_file, signed_file, gpghome=None): """takes signature , file that was signed and an optional gpghomedir""" if gpgme is None: return False if gpghome and os.path.exists(gpghome): os.environ['GNUPGHOME'] = gpghome if hasattr(sig_file, 'read'): sig = sig_file else: sig = open(sig_file, 'r') if...
3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py
def getCacheDir(tmpdir='/var/tmp', reuse=True):
def getCacheDir(tmpdir='/var/tmp', reuse=True, prefix='yum-'):
def getCacheDir(tmpdir='/var/tmp', reuse=True): """return a path to a valid and safe cachedir - only used when not running as root or when --tempcache is set""" uid = os.geteuid() try: usertup = pwd.getpwuid(uid) username = usertup[0] except KeyError: return None # if it returns None then, well, it's bollocksed prefi...
3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py
prefix = 'yum-'
prefix = prefix
def getCacheDir(tmpdir='/var/tmp', reuse=True): """return a path to a valid and safe cachedir - only used when not running as root or when --tempcache is set""" uid = os.geteuid() try: usertup = pwd.getpwuid(uid) username = usertup[0] except KeyError: return None # if it returns None then, well, it's bollocksed prefi...
3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py
prefix = 'yum-%s-' % username
prefix = '%s%s-' % (prefix, username)
def getCacheDir(tmpdir='/var/tmp', reuse=True): """return a path to a valid and safe cachedir - only used when not running as root or when --tempcache is set""" uid = os.geteuid() try: usertup = pwd.getpwuid(uid) username = usertup[0] except KeyError: return None # if it returns None then, well, it's bollocksed prefi...
3f0d169e7eeb965c1e9d438fa6f278a8ab204950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/3f0d169e7eeb965c1e9d438fa6f278a8ab204950/misc.py
return cmp(self.pkg, other.pkg) or cmp(self.problem, problem)
return cmp(self.pkg, other.pkg) or cmp(self.problem, other.problem)
def __cmp__(self, other): if other is None: return 1 return cmp(self.pkg, other.pkg) or cmp(self.problem, problem)
dbb4abff578169ccd3d1f423651089fc2832a8b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dbb4abff578169ccd3d1f423651089fc2832a8b8/rpmsack.py
if hasattr(txmbr, 'reinstall'):
if txmbr.reinstall:
def txmbr2state(txmbr): state = None if txmbr.output_state in (TS_INSTALL, TS_TRUEINSTALL): if hasattr(txmbr, 'reinstall'): state = 'Reinstall' elif txmbr.downgrades: state = 'Downgrade' if txmbr.output_state == TS_ERASE: if txmbr.downgraded_by: state = 'Downgraded' if state is None: state = _stcode2sttxt.get(txmbr.out...
10b718b3a09904789de8139dec4f1cd36a43e449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/10b718b3a09904789de8139dec4f1cd36a43e449/history.py
prefix = prefix
def getCacheDir(tmpdir='/var/tmp', reuse=True, prefix='yum-'): """return a path to a valid and safe cachedir - only used when not running as root or when --tempcache is set""" uid = os.geteuid() try: usertup = pwd.getpwuid(uid) username = usertup[0] except KeyError: return None # if it returns None then, well, it's bo...
11c4418a625e66ab45236041bdda9ba40d093095 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/11c4418a625e66ab45236041bdda9ba40d093095/misc.py
ini[repo.id][name] = option.tostring(value)
ini[section_id][name] = option.tostring(value)
def writeRawRepoFile(repo,only=None): """ Writes changes in a repo object back to a .repo file. @param repo: Repo Object @param only: List of attributes to work on (None = All) It work by reading the repo file, changes the values there shall be changed and write it back to disk. """ if not _use_iniparse: return ini =...
6fad8fd03a76192a42d1c2f0bf92184437549fb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/6fad8fd03a76192a42d1c2f0bf92184437549fb0/config.py
n = to_unicode(n)
n_b = n n_u = to_unicode(n) n = n_u
def searchPrco(self, name, prcotype): """return list of packages matching name and prcotype """ # we take name to be a string of some kind # we parse the string to see if it is a foo > 1.1 or if it is just 'foo' # or what - so we can answer correctly if self._skip_all(): return [] try: (n,f,(e,v,r)) = misc.string_to_p...
a336b5c283acf275310fc0e5b53e5299dcf044ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a336b5c283acf275310fc0e5b53e5299dcf044ce/sqlitesack.py
def searchPrco(self, name, prcotype): """return list of packages matching name and prcotype """ # we take name to be a string of some kind # we parse the string to see if it is a foo > 1.1 or if it is just 'foo' # or what - so we can answer correctly if self._skip_all(): return [] try: (n,f,(e,v,r)) = misc.string_to_p...
a336b5c283acf275310fc0e5b53e5299dcf044ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a336b5c283acf275310fc0e5b53e5299dcf044ce/sqlitesack.py
if po.checkPrco(prcotype, (n, f, (e,v,r))):
if po.checkPrco(prcotype, (n_b, f, (e,v,r))):
def searchPrco(self, name, prcotype): """return list of packages matching name and prcotype """ # we take name to be a string of some kind # we parse the string to see if it is a foo > 1.1 or if it is just 'foo' # or what - so we can answer correctly if self._skip_all(): return [] try: (n,f,(e,v,r)) = misc.string_to_p...
a336b5c283acf275310fc0e5b53e5299dcf044ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/a336b5c283acf275310fc0e5b53e5299dcf044ce/sqlitesack.py
raise Errors.DowngradeError, 'Nothing specified to remove'
raise Errors.DowngradeError, 'Nothing specified to downgrade'
def downgrade(self, po=None, **kwargs): """ Try to downgrade a package. Works like: % yum shell <<EOL remove abcd install abcd-<old-version> run EOL """
90d49d64c26bc3cf51bc3a48737132c105bca2a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/90d49d64c26bc3cf51bc3a48737132c105bca2a3/__init__.py
return syslog.LOG_USER
return syslog_module.LOG_USER
def syslogFacilityMap(facility): if type(facility) == int: return facility elif facility.upper() in _syslog_facility_map: return _syslog_facility_map[facility.upper()] elif (facility.upper().startswith("LOG_") and facility[4:].upper() in _syslog_facility_map): return _syslog_facility_map[facility[4:].upper()] return sy...
cc5d13a39dcefbc401255d224c8700f4f907f285 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/cc5d13a39dcefbc401255d224c8700f4f907f285/logginglevels.py
cols.append((str(repo), repo.name,
cols.append((rid, repo.name,
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
6d567c5bce2a6a07992219ab800bb6f3b7ab45b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/6d567c5bce2a6a07992219ab800bb6f3b7ab45b9/yumcommands.py
if ipkg.verGT(po):
for ipkg in self.rpmdb.searchNevra(name=po.name): if ipkg.verGT(po) and not canCoinstall(ipkg.arch, po.arch):
def install(self, po=None, **kwargs): """try to mark for install the item specified. Uses provided package object, if available. If not it uses the kwargs and gets the best packages from the keyword options provided returns the list of txmbr of the items it installs """ pkgs = [] was_pattern = False if po: if isinsta...
ffd42f091b4476d6fb83fae6225bde9a4d9e7623 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ffd42f091b4476d6fb83fae6225bde9a4d9e7623/__init__.py
def getPackageObject(self, pkgtup):
def getPackageObject(self, pkgtup, allow_missing=False):
def getPackageObject(self, pkgtup): """retrieves a packageObject from a pkgtuple - if we need to pick and choose which one is best we better call out to some method from here to pick the best pkgobj if there are more than one response - right now it's more rudimentary.""" # look it up in the self.localPackages first:...
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
obsoleting = obsoleting[0] obsoleting_pkg = self.getPackageObject(obsoleting) return obsoleting_pkg
for pkgtup in obsoleting: pkg = self.getPackageObject(pkgtup, allow_missing=True) if pkg is not None: return pkg return None
def _sort_arch(x, y): n1,a1,e1,v1,r1 = x n2,a2,e2,v2,r2 = y ret = _sort_arch_i(po.arch, a1, a2) if ret: return ret ret = _sort_arch_i(self.arch.bestarch, a1, a2) return ret
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
obsoleting_pkg = self.getPackageObject(obsoleting)
obsoleting_pkg = self.getPackageObject(obsoleting, allow_missing=True) if obsoleting_pkg is None: continue
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t...
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
tx_return.extend(self.update(po=self.getPackageObject(new)))
new = self.getPackageObject(new, allow_missing=True) if new is None: continue tx_return.extend(self.update(po=new))
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t...
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
opkgs = self.pkgSack.searchPkgTuple(pkgtup) if not opkgs: continue obs_pkgs.append(opkgs[0])
obsoleting_pkg = self.getPackageObject(pkgtup, allow_missing=True) if obsoleting_pkg is None: continue obs_pkgs.append(obsoleting_pkg)
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t...
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
po = self.getPackageObject(updating)
po = self.getPackageObject(updating, allow_missing=True) if po is None: continue
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of t...
17068d8e299ab477d8c6a5bc566e5f62d7b34759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/17068d8e299ab477d8c6a5bc566e5f62d7b34759/__init__.py
if not pid: return
def show_lock_owner(pid, logger): if not pid: return ps = get_process_info(pid) # This yumBackend isn't very friendly, so... if ps is not None and ps['name'] == 'yumBackend.py': nmsg = _(" The other application is: PackageKit") else: nmsg = _(" The other application is: %s") % ps['name'] logger.critical("%s", nmsg)...
abf78ea81fcf5d788fa2cbab656fbc7005dfa446 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/abf78ea81fcf5d788fa2cbab656fbc7005dfa446/utils.py
if ps is not None and ps['name'] == 'yumBackend.py':
if ps['name'] == 'yumBackend.py':
def show_lock_owner(pid, logger): if not pid: return ps = get_process_info(pid) # This yumBackend isn't very friendly, so... if ps is not None and ps['name'] == 'yumBackend.py': nmsg = _(" The other application is: PackageKit") else: nmsg = _(" The other application is: %s") % ps['name'] logger.critical("%s", nmsg)...
abf78ea81fcf5d788fa2cbab656fbc7005dfa446 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/abf78ea81fcf5d788fa2cbab656fbc7005dfa446/utils.py
raise URLGrabError(-1, _('Package does not match intended download'))
msg = _(_('Package does not match intended download. Suggestion: run yum clean metadata')) raise URLGrabError(-1, msg)
def verifyPkg(self, fo, po, raiseError): """verifies the package is what we expect it to be raiseError = defaults to 0 - if 1 then will raise a URLGrabError if the file does not check out. otherwise it returns false for a failure, true for success""" failed = False
532335518a7e47d22c30a1588d08d7a4ce94b441 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/532335518a7e47d22c30a1588d08d7a4ce94b441/__init__.py
tid = extcmds[1]
tid = None if len(extcmds) > 1: tid = extcmds[1]
def historyAddonInfoCmd(self, extcmds): tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
dc4c3674848f38d7c125f16f3b3f3fcbf42a1054 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dc4c3674848f38d7c125f16f3b3f3fcbf42a1054/output.py
old = self.history.old(tids=[tid]) if old is None:
except TypeError: pass if tid is not None: old = self.history.old(tids=[tid]) else: old = [self.history.last(complete_transactions_only=False)] if old[0] is None: self.logger.critical(_('No transaction ID, or package, given')) return 1, ['Failed history addon-info'] if not old:
def historyAddonInfoCmd(self, extcmds): tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
dc4c3674848f38d7c125f16f3b3f3fcbf42a1054 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dc4c3674848f38d7c125f16f3b3f3fcbf42a1054/output.py
print 'Available additional history information:'
print _("Transaction ID:"), hist_data.tid print _('Available additional history information:')
def historyAddonInfoCmd(self, extcmds): tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
dc4c3674848f38d7c125f16f3b3f3fcbf42a1054 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dc4c3674848f38d7c125f16f3b3f3fcbf42a1054/output.py
def historyAddonInfoCmd(self, extcmds): tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
dc4c3674848f38d7c125f16f3b3f3fcbf42a1054 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dc4c3674848f38d7c125f16f3b3f3fcbf42a1054/output.py
print '%s: No additional data found by this name' % item
print _('%s: No additional data found by this name') % item
def historyAddonInfoCmd(self, extcmds): tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
dc4c3674848f38d7c125f16f3b3f3fcbf42a1054 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/dc4c3674848f38d7c125f16f3b3f3fcbf42a1054/output.py
try: base.repos.populateSack() except yum.Errors.RepoError: if verbose: raise
if arg != 'disabled' or extcmds: try: base.repos.populateSack() base.pkgSack except yum.Errors.RepoError: if verbose: raise
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
7f9d8c86ed44f3826288c86bf74e9366b22ac532 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/7f9d8c86ed44f3826288c86bf74e9366b22ac532/yumcommands.py
if arg != 'disabled' or verbose: base.pkgSack
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
7f9d8c86ed44f3826288c86bf74e9366b22ac532 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/7f9d8c86ed44f3826288c86bf74e9366b22ac532/yumcommands.py
if not os.path.exists(logfile): f = open(logfile, 'w') os.chmod(logfile, 0600) f.close()
def setFileLog(uid, logfile): # TODO: When python's logging config parser doesn't blow up # when the user is non-root, put this in the config file. # syslog-style log if uid == 0: try: # For installroot etc. logdir = os.path.dirname(logfile) if not os.path.exists(logdir): os.makedirs(logdir, mode=0755) filelogger = lo...
b3be8de9105015e2e321816906c312d98a38e6e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/b3be8de9105015e2e321816906c312d98a38e6e6/logginglevels.py
return -ret
return ret
def __cmp__(self, other): if other is None: return 1 ret = cmp(self.problem, other.problem) if ret: return -ret ret = cmp(self.rpid, other.rpid) return -ret
6597171c73322f2c23c2985aac9d62ffad3b740a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/6597171c73322f2c23c2985aac9d62ffad3b740a/history.py
my_st.st_mtime != mtime):
int(my_st.st_mtime) != int(mtime)):
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
ec03edb00aa7d4c582876f032e47888002d097bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ec03edb00aa7d4c582876f032e47888002d097bf/packages.py
prob.disk_value = my_st.st_mtime
prob.disk_value = int(my_st.st_mtime)
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "...
ec03edb00aa7d4c582876f032e47888002d097bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ec03edb00aa7d4c582876f032e47888002d097bf/packages.py
summary += _(' At least %dMB needed on the %s filesystem.\n') % (disk[k], k)
summary += _(' At least %dMB more space needed on the %s filesystem.\n') % (disk[k], k)
def errorSummary(self, errstring): """ parse the error string for 'interesting' errors which can be grouped, such as disk space issues """ summary = '' # do disk space report first p = re.compile('needs (\d+)MB on the (\S+) filesystem') disk = {} for m in p.finditer(errstring): if not disk.has_key(m.group(2)): disk[m.g...
510d9769ac31ec9cd91b2e9b418c018682cfea9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/510d9769ac31ec9cd91b2e9b418c018682cfea9d/cli.py
errtring = str(depstring)
errstring = str(depstring)
def returnPackageByDep(self, depstring): """Pass in a generic [build]require string and this function will pass back the best(or first) package it finds providing that dep.""" # we get all sorts of randomness here errstring = depstring if type(depstring) not in types.StringTypes: errtring = str(depstring) try: pkglis...
ed0730848ffe7f8aa5e5431ac18162f0cc3efddf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/ed0730848ffe7f8aa5e5431ac18162f0cc3efddf/__init__.py
obsoleting = thispkgobsdict[po.pkgtup][0]
obsoleting = thispkgobsdict[po.pkgtup] oobsoleting = [] for opkgtup in obsoleting: if not canCoinstall(po.arch, opkgtup[1]): oobsoleting.append(opkgtup) if oobsoleting: obsoleting = oobsoleting obsoleting = obsoleting[0]
def _pkg2obspkg(self, po): """ Given a package return the package it's obsoleted by and so we should install instead. Or None if there isn't one. """ thispkgobsdict = self.up.checkForObsolete([po.pkgtup]) if po.pkgtup in thispkgobsdict: obsoleting = thispkgobsdict[po.pkgtup][0] obsoleting_pkg = self.getPackageObject(ob...
0408550d397b266840eb84e1c856ed8830586952 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/0408550d397b266840eb84e1c856ed8830586952/__init__.py