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
Tags v4.0.1
1 merge request!70Try a fix for issue #77
...@@ -17,9 +17,11 @@ def main(scandir, dry_run): ...@@ -17,9 +17,11 @@ def main(scandir, dry_run):
if f.startswith('.'): continue if f.startswith('.'): continue
if not f.endswith('.tar.bz2'): continue if not f.endswith('.tar.bz2'): continue
name, version, build_string = f[:-8].rsplit('-', 2) 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 name = os.path.basename(path) + '/' + name
if pyver: name += '/' + pyver
target = os.path.join(path, f) target = os.path.join(path, f)
betas.setdefault(name, []).append(( betas.setdefault(name, []).append((
StrictVersion(version), StrictVersion(version),
...@@ -39,9 +41,9 @@ def main(scandir, dry_run): ...@@ -39,9 +41,9 @@ def main(scandir, dry_run):
keep_version, keep_build, _, _ = sorted_packages[-1] keep_version, keep_build, _, _ = sorted_packages[-1]
for version, build, mtime, path in sorted_packages: for version, build, mtime, path in sorted_packages:
if version == keep_version and build == keep_build: if version == keep_version and build == keep_build:
print('[keep] %s (%u)' % (path, mtime)) print('[keep] %s (time=%u)' % (path, mtime))
else: else:
print('remove %s (%u)' % (path, mtime)) print('remove %s (time=%u)' % (path, mtime))
if not dry_run: os.unlink(path) if not dry_run: os.unlink(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment