bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
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...
def decompress(filename, dest=None, fn_only=False, check_timestamps=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('.g...
464,000
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)
def _pkgExcludedRKT(self, repo,pkgKey, pkgtup): ''' Helper function to call _pkgExcludedRKNEVRA. Takes a repo, pkgKey and a package tuple''' (n,a,e,v,r) = pkgtup return self._pkgExcludedRKNEVRA(repo, pkgKey, n,e,v,r,a)
464,001
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)
def _pkgExcludedRKD(self, repo,pkgKey, data): ''' Helper function to call _pkgExcludedRKNEVRA. 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)
464,002
def _pkgExcluded(self, po): ''' Helper function to call _pkgRKNEVRAExcluded. Takes a package object. ''' return self._pkgExcludedRKT(po.repo, po.pkgKey, po.pkgtup)
def _pkgExcluded(self, po): ''' Helper function to call _pkgExcludedRKNEVRA. Takes a package object. ''' return self._pkgExcludedRKT(po.repo, po.pkgKey, po.pkgtup)
464,003
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) =...
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) ...
464,004
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 ...
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 ...
464,005
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 ...
def 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.exten...
464,006
def _out(x): print x
def _out(x): print x
464,007
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
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
464,008
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 []
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._pkgname_fails: return []
464,009
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 []
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 []
464,010
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 []
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 []
464,011
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...
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 _s...
464,012
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...
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...
464,013
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...
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...
464,014
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...
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...
464,015
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...
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...
464,016
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...
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 Note that given: foo-1.i386...
464,017
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...
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.""" raise NotImplementedError()
464,018
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...
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. Note that given: foo-1.i38...
464,019
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...
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.""" pkgs = self._computeAggregateListResult("returnNewestByName", name, patterns, ...
464,020
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...
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 Note that given: foo-1.i386...
464,021
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...
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...
464,022
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 = ...
def packagesNewestByName(pkgs): """ Does the same as PackageSack.returnNewestByName(). Note that given: foo-1.i386; foo-2.i386 and foo-3.x86_64""" newest = {} for pkg in pkgs: key = pkg.name # Can't use pkg.__cmp__ because it takes .arch into account cval = 1 if key in newest: cval = pkg.verCMP(newest[key][0]) if cval...
464,023
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()
def packagesNewestByNameArch(pkgs): """ Does the same as PackageSack.returnNewestByNameArch() The last _two_ pkgs will be returned, not just one of them.""" 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()
464,024
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...
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...
464,025
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 "...
464,026
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 "...
464,027
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 "...
464,028
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 "...
464,029
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 "...
464,030
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 "...
464,031
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 "...
464,032
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 "...
464,033
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 "...
464,034
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 "...
464,035
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 "...
464,036
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 "...
464,037
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 "...
464,038
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 "...
464,039
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 "...
464,040
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 "...
464,041
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 "...
464,042
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 "...
464,043
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 "...
464,044
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 "...
464,045
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 "...
464,046
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 "...
464,047
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 "...
464,048
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 "...
464,049
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 "...
464,050
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 "...
464,051
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 "...
464,052
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 "...
464,053
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 "...
464,054
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 "...
464,055
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 "...
464,056
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 "...
464,057
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 "...
464,058
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....
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....
464,059
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/"
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/"
464,060
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']...
def import_key_to_pubring(rawkey, keyid, cachedir=None, gpgdir=None, make_ro_copy=True): # 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.e...
464,061
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...
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: if not os.path.exists(gpghome): return False os.environ['GNUPGHOME'] = gpghome if hasattr(sig_file, 'read'): sig = sig_file else: sig = open(...
464,062
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...
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...
464,063
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...
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...
464,064
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...
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...
464,065
def __cmp__(self, other): if other is None: return 1 return cmp(self.pkg, other.pkg) or cmp(self.problem, problem)
def __cmp__(self, other): if other is None: return 1 return cmp(self.pkg, other.pkg) or cmp(self.problem, problem)
464,066
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...
def txmbr2state(txmbr): state = None if txmbr.output_state in (TS_INSTALL, TS_TRUEINSTALL): if 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.output_state) i...
464,067
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...
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...
464,068
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 =...
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 =...
464,069
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...
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...
464,070
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...
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...
464,071
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...
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...
464,072
def downgrade(self, po=None, **kwargs): """ Try to downgrade a package. Works like: % yum shell <<EOL remove abcd install abcd-<old-version> run EOL """
def downgrade(self, po=None, **kwargs): """ Try to downgrade a package. Works like: % yum shell <<EOL remove abcd install abcd-<old-version> run EOL """
464,073
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...
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...
464,074
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
464,075
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...
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...
464,076
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:...
def getPackageObject(self, pkgtup, allow_missing=False): """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...
464,077
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
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
464,078
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...
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...
464,079
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...
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...
464,080
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...
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...
464,081
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...
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...
464,082
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)...
def show_lock_owner(pid, logger): 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) logger.critical(_("...
464,083
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)...
def show_lock_owner(pid, logger): if not pid: return ps = get_process_info(pid) # This yumBackend isn't very friendly, so... if ps['name'] == 'yumBackend.py': nmsg = _(" The other application is: PackageKit") else: nmsg = _(" The other application is: %s") % ps['name'] logger.critical("%s", nmsg) logger.critical(_(...
464,084
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
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
464,085
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']
def historyAddonInfoCmd(self, extcmds): tid = None if len(extcmds) > 1: tid = extcmds[1] try: int(tid) except ValueError: self.logger.critical(_('No transaction ID given')) return 1, ['Failed history addon-info']
464,086
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']
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']
464,087
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']
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']
464,088
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']
defhistoryAddonInfoCmd(self,extcmds):tid=extcmds[1]try:int(tid)exceptValueError:self.logger.critical(_('NotransactionIDgiven'))return1,['Failedhistoryaddon-info']
464,089
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']
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']
464,090
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
464,091
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
def _num2ui_num(num): return to_unicode(locale.format("%d", num, True))
464,092
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...
def if not os.path.exists(logfile): f = open(logfile, 'w') os.chmod(logfile, 0600) f.close() setFileLog(uid, if not os.path.exists(logfile): f = open(logfile, 'w') os.chmod(logfile, 0600) f.close() logfile): if not os.path.exists(logfile): f = open(logfile, 'w') os.chmod(logfile, 0600) f.close() # if not os.path.exi...
464,093
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
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
464,094
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 "...
464,095
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 "...
464,096
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...
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...
464,097
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...
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: errstring = str(depstring) try: pkgli...
464,098
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...
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] oobsoleting = [] for opkgtup in obsoleting...
464,099