sm.close()
def move_noarch(f, arch, rpmfile, dstpkg):
- if dstpkg.noarch_arch.has_key(rpmfile):
+ if rpmfile in dstpkg.noarch_arch:
os.system("LC_ALL=C rpm -qlp %s | LC_ALL=C sort > %s/files.new" %
(incoming_dir + arch + '/' + rpmfile, tmpdir))
os.system("rpm -qRp %s | LC_ALL=C sort | LC_ALL=C uniq > %s/reqs.new" %
(incoming_dir + arch + '/' + rpmfile, noarchcachedir, rpmfile))
os.system("rpm -qRp %s | LC_ALL=C sort | LC_ALL=C uniq > %s/%s.reqlist" %
(incoming_dir + arch + '/' + rpmfile, noarchcachedir, rpmfile))
- if not dstpkg.files.has_key(arch):
+ if arch not in dstpkg.files:
f.write("file:noarch:%s\ninfo:noarch_arch:%s:%s\n" % (rpmfile, rpmfile, arch))
mv(incoming_dir + arch + '/' + rpmfile, default_to + 'noarch/RPMS')
dstpkg = BasePkg(`srcpkg`, ftptree)
- if dstpkg.files.has_key(arch):
+ if arch in dstpkg.files:
ftpio.log("files from %s for arch %s already present in %s; removing older files" % (`srcpkg`, arch, ftptree))
for rpmfile in dstpkg.files[arch]:
if is_debuginfo(rpmfile):
if rpmfile[-11:] == '.noarch.rpm' and config.separate_noarch:
move_noarch(f, arch, rpmfile, dstpkg)
else:
- if not dstpkg.files.has_key(arch):
+ if arch not in dstpkg.files:
f.write("file:%s:%s\n" % (arch, rpmfile))
srcfile = incoming_dir + arch + '/' + rpmfile
def load(self, content=None):
BasePkg.load(self, content)
- if self.info.has_key('move'):
+ if 'move' in self.info:
self.mark4moving()
def writeinfo(self):
self.do_checkbuild = True
def __getitem__(self, key):
- if self.loadedpkgs.has_key(key):
+ if key in self.loadedpkgs:
return self.loadedpkgs[key]
elif key in self.pkgnames:
pkg=Pkg(key, self)
for pkg in marked:
for bid in pkg.build.keys():
- if requests.has_key(bid) and not requests[bid].find('?') == -1:
+ if bid in requests and not requests[bid].find('?') == -1:
pkg.error("(buildid %s) building not finished" % bid)
def __checkarchs(self, dsttree, marked):