if not os.path.exists(path):
os.makedirs(path)
if not os.path.exists(os.path.join(path, \
- '%s_%s.changelog' % (p, sources[p][s][0]))):
+ '%s_%s_changelog' % (p, sources[p][s][0]))):
if not unpack.has_key(os.path.join(pool, sources[p][s][1])):
unpack[os.path.join(pool, sources[p][s][1])] = (path, set())
unpack[os.path.join(pool, sources[p][s][1])][1].add(s)
for file in files:
for f in glob(os.path.join(tempdir, 'debian', '*%s' % file)):
for s in unpack[p][1]:
- suite = os.path.join(unpack[p][0], '%s.%s' \
+ suite = os.path.join(unpack[p][0], '%s_%s' \
% (s, os.path.basename(f)))
- version = os.path.join(unpack[p][0], '%s_%s.%s' % \
+ version = os.path.join(unpack[p][0], '%s_%s_%s' % \
(package[0], package[1], os.path.basename(f)))
if not os.path.exists(version):
os.link(f, version)
if len(files):
if root.split('/')[-1] not in sources.keys():
if os.path.exists(root):
+ stats['removed'] += len(os.listdir(root))
rmtree(root)
- stats['removed'] += 1
for file in files:
if os.path.exists(os.path.join(root, file)):
if os.stat(os.path.join(root, file)).st_nlink == 1:
- os.unlink(os.path.join(root, file))
stats['removed'] += 1
+ os.unlink(os.path.join(root, file))
for root, dirs, files in os.walk(clpool):
stats['files'] += len(files)