rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
add_nuninst(p[0], arch) | add_nuninst(p, arch) | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
undo = {'binaries': {}, 'sources': {}} | undo = {'binaries': {}, 'sources': {}, 'virtual': {}, 'nvirtual': []} | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
for p in self.get_full_tree(j[0], arch, 'testing'): | for p in self.get_full_tree(j, arch, 'testing'): | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) | packages.extend([x for x in binaries[p]['rdepends'] if x not in packages and x in binaries]) | def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) n = l return packages | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
if p[0] not in binaries[arch][0] or \ skip_archall and binaries[arch][0][p[0]]['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=broken, conflicts=True) if not r and p[0] not in broken: broken.append(p[0]) | if p not in binaries[arch][0] or \ skip_archall and binaries[arch][0][p]['architecture'] == 'all': continue r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=broken, conflicts=True) if not r and p not in broken: broken.append(p) | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py |
if arch not in self.options.break_arches and \ len(nuninst[arch]) > len(nuninst_comp[arch]): | if (("/" in pkg and arch not in self.options.new_arches) or \ (arch not in self.options.break_arches)) and len(nuninst[arch]) > len(nuninst_comp[arch]): | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | f96887ca417b82b3c9856e97ac546b19a26970be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f96887ca417b82b3c9856e97ac546b19a26970be/britney.py |
del self.binaries['testing'][arch][0][p] | del self.binaries['testing'][arch][0][binary] | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 5183a9704645df29822a9dd5249405b85b738eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/5183a9704645df29822a9dd5249405b85b738eba/britney.py |
if arch not in self.systems: self.build_systems(arch) | self.build_systems(arch) | def __init__(self): """Class constructor | d16584a8caf5d59b3d0dbc27ac0c4db80f5f866e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/d16584a8caf5d59b3d0dbc27ac0c4db80f5f866e/britney.py |
for arch in self.options.architectures.split(): | for arch in self.options.architectures: | def __init__(self): """Class constructor method: initialize and populate the data lists""" self.__parse_arguments() apt_pkg.init() self.date_now = int(((time.time() / (60*60)) - 15) / 24) self.sources = {'testing': self.read_sources(self.options.testing), 'unstable': self.read_sources(self.options.unstable), 'tpu': sel... | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for arch in self.options.architectures.split(): | for arch in self.options.architectures: | def maxver(self, pkg, dist): maxver = None if self.sources[dist].has_key(pkg): maxver = self.sources[dist][pkg]['version'] for arch in self.options.architectures.split(): if not self.binaries[dist][arch][0].has_key(pkg): continue pkgv = self.binaries[dist][arch][0][pkg]['version'] if maxver == None or apt_pkg.VersionCo... | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py | |
return (True, packages) | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py | |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py | ||
if name in self.binaries['unstable'][arch][1]: for prov in self.binaries['unstable'][arch][1][name]: package = self.binaries['unstable'][arch][0][prov] | if name in self.binaries[distribution][arch][1]: for prov in self.binaries[distribution][arch][1][name]: package = self.binaries[distribution][arch][0][prov] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
packages.append(name) | packages.append(prov) | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
if len(packages) > 0: return (True, packages) if real_package: missing.append(name) return (False, missing) | return (len(packages) > 0, packages) | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for pkg in source_u['binaries']: | for pkg in sorted(source_u['binaries']): | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
excuse.addhtml("Ignoring %s %s (from %s) as it is arch: all" % (pkg, binary_u['version'], pkgsv)) | excuse.addhtml("Ignoring %s %s (from %s) as it is arch: all" % (pkg_name, binary_u['version'], pkgsv)) | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
excuse.addhtml("From wrong source: %s %s (%s not %s)" % (pkg, binary_u['version'], pkgsv, source_t['version'])) | excuse.addhtml("From wrong source: %s %s (%s not %s)" % (pkg_name, binary_u['version'], pkgsv, source_t['version'])) | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
excuse.addhtml("New binary: %s (%s)" % (pkg, binary_u['version'])) | excuse.addhtml("New binary: %s (%s)" % (pkg_name, binary_u['version'])) | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
excuse.addhtml("Not downgrading: %s (%s to %s)" % (pkg, binary_t['version'], binary_u['version'])) | excuse.addhtml("Not downgrading: %s (%s to %s)" % (pkg_name, binary_t['version'], binary_u['version'])) | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
excuse.addhtml("Updated binary: %s (%s to %s)" % (pkg, binary_t['version'], binary_u['version'])) | excuse.addhtml("Updated binary: %s (%s to %s)" % (pkg_name, binary_t['version'], binary_u['version'])) | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for pkg in set(k.split("/")[0] for k in self.sources['testing'][src]['binaries']): | for pkg in sorted([x.split("/")[0] for x in self.sources['testing'][src]['binaries'] if x.endswith("/"+arch)]): | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
update_candidate = False | update_candidate = False | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for arch in self.options.architectures.split(): | for arch in self.options.architectures: | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for pkg in set(k.split("/")[0] for k in self.sources[suite][src]['binaries']): | for pkg in sorted([x.split("/")[0] for x in self.sources[suite][src]['binaries'] if x.endswith("/"+arch)]): | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for arch in self.options.architectures.split(): | for arch in self.options.architectures: | def main(self): """Main method, entry point for the analisys""" | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
for arch in self.options.architectures.split(): | for arch in self.options.architectures: | def main(self): """Main method, entry point for the analisys""" | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py |
def iter_packages(self, packages, hint=False): | def iter_packages(self, packages, selected, hint=False): | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
self.output_write("recur: [%s] %s %d/%d\n" % (",".join(self.selected), "", len(packages), len(extra))) | self.output_write("recur: [%s] %s %d/%d\n" % (",".join(selected), "", len(packages), len(extra))) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
self.selected.append(pkg) | selected.append(pkg) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
self.output_write(" now: %s\n" % (self.eval_nuninst(nuninst))) if len(self.selected) <= 20: self.output_write(" all: %s\n" % (" ".join(self.selected))) | self.output_write(" now: %s\n" % (self.eval_nuninst(nuninst, nuninst_comp))) if len(selected) <= 20: self.output_write(" all: %s\n" % (" ".join(selected))) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
self.output_write(" most: (%d) .. %s\n" % (len(self.selected), " ".join(self.selected[-20:]))) | self.output_write(" most: (%d) .. %s\n" % (len(selected), " ".join(selected[-20:]))) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
self.output_write(" finish: [%s]\n" % ",".join(self.selected)) | self.output_write(" finish: [%s]\n" % ",".join(selected)) | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
selected = self.selected[:] | selected = self.selected | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
(nuninst_end, lundo) = self.iter_packages(init, hint=True) | (nuninst_end, lundo) = self.iter_packages(init, selected, hint=True) | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
(nuninst_end, extra) = self.iter_packages(upgrade_me) | (nuninst_end, extra) = self.iter_packages(upgrade_me, selected) | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 3c58b798cd50f8be9e049992349195127926024b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/3c58b798cd50f8be9e049992349195127926024b/britney.py |
binaries[arch][0][binary] = undo['binaries'][p] | if binary[0] == "-": del binaries[arch][0][binary[1:]] else: binaries[arch][0][binary] = undo['binaries'][p] | def iter_packages(self, packages, output): """Iter on the list of actions and apply them one-by-one | a061c4719fef8a2ef1556ed1b97a8688e8b43526 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/a061c4719fef8a2ef1556ed1b97a8688e8b43526/britney.py |
def iter_packages(self, packages, selected, hint=False): | def iter_packages(self, packages, selected, hint=False, nuninst=None): | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
nuninst_comp = self.nuninst_orig.copy() | if nuninst: nuninst_comp = nuninst.copy() else: nuninst_comp = self.nuninst_orig.copy() | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
self.output_write("recur: [%s] %s %d/%d\n" % (",".join(selected), "", len(packages), len(extra))) | self.output_write("recur: [%s] %s %d/%d\n" % ("", ",".join(selected), len(packages), len(extra))) | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
pkg_name, suite, affected, undo = self.doop_source(pkg) | if pkg in pre_process: pkg_name, suite, affected, undo = pre_process[pkg] else: pkg_name, suite, affected, undo = self.doop_source(pkg) | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
if hint: continue | if hint or pkg in selected: continue | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
self.output_write("Apparently successful\n") | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py | |
backup = self.nuninst_orig | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py | |
self.nuninst_orig = nuninst_end (nuninst_end, extra) = self.iter_packages(upgrade_me, selected) | else: nuninst_end = None (nuninst_end, extra) = self.iter_packages(upgrade_me, selected, nuninst=nuninst_end) | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 124a122a4d1781c15e7d8ce5a75df2c0c337d6c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/124a122a4d1781c15e7d8ce5a75df2c0c337d6c3/britney.py |
if arch not in self.options.break_arches and \ len(nuninst[arch]) > len(nuninst_comp[arch]): | if (("/" in pkg and arch not in self.options.new_arches) or \ (arch not in self.options.break_arches)) and len(nuninst[arch]) > len(nuninst_comp[arch]): | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 1c1a6723864e1594563dd146385f01f3e5edeeac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/1c1a6723864e1594563dd146385f01f3e5edeeac/britney.py |
for p in filter(lambda x: x[3] == arch, affected): if not self.binaries['testing'][arch][0].has_key(p[0]) or \ skip_archall and self.binaries['testing'][arch][0][p[0]]['architecture'] == 'all': continue r = self.excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=[]) if not r and p[0] not in broken: broken.ap... | nbroken = -1 while len(broken) > nbroken: nbroken = len(broken) for p in filter(lambda x: x[3] == arch, affected): if not self.binaries['testing'][arch][0].has_key(p[0]) or \ skip_archall and self.binaries['testing'][arch][0][p[0]]['architecture'] == 'all': continue r = self.excuse_unsat_deps(p[0], None, arch, 'testing... | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 4c244612e5aab657228c46716aa44ab98349ab71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/4c244612e5aab657228c46716aa44ab98349ab71/britney.py |
del self.binaries['testing'][arch][0][p] | del self.binaries['testing'][arch][0][binary] | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 78137781050f6638e23870d61a8d437a2e27a8f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/78137781050f6638e23870d61a8d437a2e27a8f4/britney.py |
if conflicts[c][3] == pkg: | i = 0 while i < len(conflicts[c]): if conflicts[c][i][3] == pkg: del conflicts[c][i] else: i = i + 1 if len(conflicts[c]) == 0: | def unregister_conflicts(pkg, conflicts): for c in conflicts.keys(): if conflicts[c][3] == pkg: del conflicts[c] | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
return handle_conflict(pkg, system[source][1], system, conflicts) | for p in system[source][1]: if not p: return False output = handle_conflict(pkg, p, system, conflicts) if output: system, conflicts = output else: return False return (system, conflicts) | def handle_conflict(pkg, source, system, conflicts): # reached the top of the tree if not system[source][1]: return False # remove its conflicts unregister_conflicts(source, conflicts) # if there are alternatives, try them alternatives = system[source][0] for alt in alternatives: if satisfy(alt, [x for x in alternative... | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
system[pkg] = (pkg_alt, pkg_from) | if type(pkg_from) != list: pkg_from = [pkg_from] system[pkg] = (pkg_alt or [], pkg_from) | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
system[p] = ([], pkg) | system[p] = ([], [pkg]) | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
name, version, op, conflicting = conflicts[pkg] if conflicting not in binary_u['provides'] and ( \ op == '' and version == '' or check_depends(binary_u['version'], op, version)): output = handle_conflict(pkg, conflicting, system.copy(), conflicts.copy()) if output: system, conflicts = output else: del system[pkg] re... | for name, version, op, conflicting in conflicts[pkg]: if conflicting not in binary_u['provides'] and ( \ op == '' and version == '' or check_depends(binary_u['version'], op, version)): output = handle_conflict(pkg, conflicting, system.copy(), conflicts.copy()) if output: system, conflicts = output else: del system[p... | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
conflicts[block[0]] = (name, version, op, pkg) | if block[0] not in conflicts: conflicts[block[0]] = [] conflicts[block[0]].append((name, version, op, pkg)) | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
for type in ('pre-depends', 'depends'): if type not in binary_u: continue dependencies.extend(parse_depends(binary_u[type])) | for key in ('pre-depends', 'depends'): if key not in binary_u: continue dependencies.extend(parse_depends(binary_u[key])) | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 7c3083e8aecd4d52f70a875ac1d082759a2858e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/7c3083e8aecd4d52f70a875ac1d082759a2858e5/britney.py |
", ".join(nuninst[arch])) | ", ".join(sorted(nuninst[arch]))) | def eval_uninst(self, nuninst): res = "" for arch in self.options.architectures: if arch in nuninst and nuninst[arch] != []: res = res + " * %s: %s\n" % (arch, ", ".join(nuninst[arch])) return res | ffeddc471d8a477df144d4e513c8a8dae814240b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ffeddc471d8a477df144d4e513c8a8dae814240b/britney.py |
nuninst[arch] = nuninst_comp[arch][:] | nuninst[arch] = [x for x in nuninst_comp[arch] if x in binaries[arch][0]] | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | ffeddc471d8a477df144d4e513c8a8dae814240b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ffeddc471d8a477df144d4e513c8a8dae814240b/britney.py |
output.write(" got: %s\n" % (self.eval_nuninst(nuninst, "/" in pkg and self.nuninst_orig or None))) output.write(" * %s: %s\n" % (arch, ", ".join(sorted(broken)))) | output.write(" got: %s\n" % (self.eval_nuninst(nuninst, "/" in pkg and nuninst_comp or None))) output.write(" * %s: %s\n" % (arch, ", ".join(sorted([b for b in broken if b not in nuninst_comp[arch]])))) | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | ffeddc471d8a477df144d4e513c8a8dae814240b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ffeddc471d8a477df144d4e513c8a8dae814240b/britney.py |
parse_depends = apt_pkg.ParseDepends | register_reverses = self.register_reverses | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
dependencies = [] if 'depends' in packages[pkg]: dependencies.extend(parse_depends(packages[pkg]['depends'])) if 'pre-depends' in packages[pkg]: dependencies.extend(parse_depends(packages[pkg]['pre-depends'])) for p in dependencies: | register_reverses(pkg, packages, provides, check_doubles=False) return (packages, provides) def register_reverses(self, pkg, packages, provides, check_doubles=True, parse_depends=apt_pkg.ParseDepends): """Register reverse dependencies and conflicts for the specified package This method register the reverse dependen... | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
if a[0] in packages: packages[a[0]]['rdepends'].append((pkg, a[1], a[2])) | if a[0] in packages and (not check_doubles or pkg not in packages[a[0]]['rconflicts']): packages[a[0]]['rconflicts'].append(pkg) | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
packages[i]['rdepends'].append((pkg, a[1], a[2])) if 'conflicts' in packages[pkg]: for p in parse_depends(packages[pkg]['conflicts']): if a[0] in packages: packages[a[0]]['rconflicts'].append((pkg, a[1], a[2])) elif a[0] in provides: for i in provides[a[0]]: packages[i]['rconflicts'].append((pkg, a[1], a[2])) return... | if i not in packages: continue if not check_doubles or pkg not in packages[i]['rconflicts']: packages[i]['rconflicts'].append(pkg) | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
tpkg = binaries[arch][0][p[0]] | tpkg = binaries[arch][0][p] | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
add_nuninst(p[0], arch) | add_nuninst(p, arch) | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
undo = {'binaries': {}, 'sources': {}} | undo = {'binaries': {}, 'sources': {}, 'virtual': {}, 'nvirtual': []} | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
for p in self.get_full_tree(j[0], arch, 'testing'): | for p in self.get_full_tree(j, arch, 'testing'): | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
key = (j[0], arch) | key = (j, arch) | def doop_source(self, pkg): | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) | packages.extend([x for x in binaries[p]['rdepends'] if x not in packages and x in binaries]) | def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) n = l return packages | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
if p[0] not in binaries[arch][0] or \ skip_archall and binaries[arch][0][p[0]]['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=broken, conflicts=True) if not r and p[0] not in broken: broken.append(p[0]) | if p not in binaries[arch][0] or \ skip_archall and binaries[arch][0][p]['architecture'] == 'all': continue r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=broken, conflicts=True) if not r and p not in broken: broken.append(p) | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py |
self.log = EinzelDateiLogger('debug.log') | self.loger = EinzelDateiLogger('debug.log') | def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self.log = EinzelDateiLogger('debug.log') self._ver... | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Debug'," ".join(zeile)) | self.loger.log('Debug'," ".join(zeile)) | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
if not befehl['befehl'].startswith('_') or befehl['befehl'].startswith('on_'): try: temp = getattr(self,'cmd_%s' % befehl['befehl']) temp(befehl) except AttributeError: self.notice(befehl['quelle']['nickname'],'Befehl nicht gefunden: %s' % befehl['befehl']) else: | try: temp = getattr(self,'cmd_%s' % befehl['befehl']) temp(befehl) self.loger.log('Befehl','Befehl von %s: %s' % (befehl['quelle']['nickname']," ".join([befehl['befehl']," ".join(befehl['argumente'])]))) except AttributeError: | def _teile_befehl(self,zeile): '''teilt Befehle in ein Dictionary auf: befehl['quelle']['host'],['ident'],['nick'] jeweils als string befehl['ziel'] string befehl['befehl'] string befehl['argumente'] liste | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
def cmd_die(self,*befehl): | def cmd_die(self,befehl): | def cmd_die(self,*befehl): '''schaltet den Bot ab''' befehl = befehl[0] if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
befehl = befehl[0] | def cmd_die(self,*befehl): '''schaltet den Bot ab''' befehl = befehl[0] if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py | |
def cmd_ping(self,*befehl): | def cmd_ping(self,befehl): | def cmd_ping(self,*befehl): '''antwortet mit pong''' if befehl['ziel'].startswith('#'): self.msg(befehl['ziel'],'Pong') else: self.notice(befehl['quelle']['nickname'],'Pong') | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Rausgehend','Raw: %s' % rausgehendes) | self.loger.log('Rausgehend','Raw: %s' % rausgehendes) | def rawsend(self,rausgehendes): '''schickt Daten an den Server erwartet: das, was geschickt werden soll gibt auch nix zurck, erspart uns aber die lstige Fehlersuche, wenn die Zeichen am Zeilenende vergessen worden sind.''' self.so.send('%s\r\n' % rausgehendes) self.log.log('Rausgehend','Raw: %s' % rausgehendes) | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Verbindung','Channel %s betreten' % channel) | self.loger.log('Verbindung','Channel %s betreten' % channel) | def join(self,channel,key=''): '''betritt Channel''' self.log.log('Verbindung','Channel %s betreten' % channel) self.rawsend('JOIN %s %s' % (channel, key)) | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log('Rausgehendes','Message an %s:' % befehl['ziel']) | self.loger.log('Rausgehendes','Message an %s: %s' % (ziel,nachricht)) | def msg(self,ziel,nachricht): '''schickt Nachrichten raus''' self.rawsend('PRIVMSG %s :%s' % (ziel, nachricht)) self.log('Rausgehendes','Message an %s:' % befehl['ziel']) | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Rausgehendes','Notice an %s:' % befehl['ziel']) | self.loger.log('Rausgehendes','Notice an %s: %s' % (ziel,nachricht)) | def notice(self,ziel,nachricht): '''schickt eine Nachricht als Notice raus''' self.rawsend('NOTICE %s :%s' % (ziel,nachricht)) self.log.log('Rausgehendes','Notice an %s:' % befehl['ziel']) | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') | self.loger.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') | def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') e... | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Verbindng','Nickname war bereits belegt, %s wird versucht' % self.currentnickname) | self.loger.log('Verbindng','Nickname war bereits belegt, %s wird versucht' % self.currentnickname) | def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') e... | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Verbindung','Verbindung hergestellt') print "Verbindung hergestellt" | self.loger.log('Verbindung','Verbindung hergestellt') print "Verbindung hergestellt" | def on_001(self,zeile): '''die IRC Verbindung ist gerade hergestellt worden Das ist die ideale Gelegenheit, am Anfang auszufuehrende Befehle einzugeben''' self.log.log('Verbindung','Verbindung hergestellt') print "Verbindung hergestellt" pass | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
self.log.log('Nachricht','%s <%s!%s@%s> %s' % (zeile['ziel'],zeile['quelle']['nickname'],zeile['quelle']['ident'],zeile['quelle']['host']," ".join(zeile['inhalt']))) print 'Nachricht von %s an %s: %s' % (zeile['quelle']['nickname'], zeile['ziel'], zeile['inhalt']) | self.loger.log('Nachricht','%s <%s!%s@%s> %s' % (zeile['ziel'],zeile['quelle']['nickname'],zeile['quelle']['ident'],zeile['quelle']['host']," ".join(zeile['inhalt']))) | def on_PRIVMSG(self,zeile): '''bearbeitet eingehende Nachrichten''' if zeile['inhalt'][0].startswith(self.currentnickname) or zeile['ziel'] == self.currentnickname: # der bot wird entweder angesprochen oder er kriegt eine private message self._teile_befehl(zeile) self.log.log('Nachricht','%s <%s!%s@%s> %s' % (zeile['zi... | 97fd12deea4b6666c5a17c647308be3fd93ec7f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/97fd12deea4b6666c5a17c647308be3fd93ec7f8/ircbot.py |
def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self._verbinde(server,nickname,ident,realname) # gl... | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py | ||
print 'DEBUG: >> USER %s * * :%s' % (ident, realname) | def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py | |
print 'DEBUG: >> NICK %s' % self.currentnickname | def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py | |
print 'DEBUG: <<%s' % zeile | self.log.log('Debug'," ".join(zeile)) | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py |
print 'DEBUG: >> PONG an den Server geschickt' | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.