Skip to content
Snippets Groups Projects
Commit fff16e5f authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'issue-77' into 'master'

Try a fix for issue #77

Closes #77

See merge request !70
parents 66783db1 3dc2a5f4
No related branches found
No related tags found
1 merge request!70Try a fix for issue #77
......@@ -17,9 +17,11 @@ def main(scandir, dry_run):
if f.startswith('.'): continue
if not f.endswith('.tar.bz2'): continue
name, version, build_string = f[:-8].rsplit('-', 2)
build = build_string.rsplit('_')[-1]
hash_, build = build_string.rsplit('_')
pyver, _ = hash_.rsplit('h', 1)
name = os.path.basename(path) + '/' + name
if pyver: name += '/' + pyver
target = os.path.join(path, f)
betas.setdefault(name, []).append((
StrictVersion(version),
......@@ -39,9 +41,9 @@ def main(scandir, dry_run):
keep_version, keep_build, _, _ = sorted_packages[-1]
for version, build, mtime, path in sorted_packages:
if version == keep_version and build == keep_build:
print('[keep] %s (%u)' % (path, mtime))
print('[keep] %s (time=%u)' % (path, mtime))
else:
print('remove %s (%u)' % (path, mtime))
print('remove %s (time=%u)' % (path, mtime))
if not dry_run: os.unlink(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment