diff --git a/conda/clean-betas.py b/conda/clean-betas.py index 5c3559fa0a564f792d1e9ee36cc46ad78b34f7bc..1c1a0f243b03f07f461ac525bf98b9d90ec1229c 100755 --- a/conda/clean-betas.py +++ b/conda/clean-betas.py @@ -78,9 +78,9 @@ def main(scandir, dry_run): # got a beta package since it matches our regex, insert it into our # list of packages to evaluate - name = os.path.basename(path) + '-' + m.group('name') + name = os.path.basename(path) + '/' + m.group('name') target = os.path.join(path, f) - if m.group('python') is not None: name += '-' + m.group('python') + if m.group('python') is not None: name += '@' + m.group('python') betas.setdefault(name, []).append(( StrictVersion(m.group('version')), #version int(m.group('build')), #build number @@ -89,15 +89,17 @@ def main(scandir, dry_run): )) count = sum([len(k) for k in betas.values()]) - len(betas) - print('end of scan: prunning %d packages' % count) + print('end of scan') + print(' - %d variants' % len(betas)) + print(' - %d packages found' % count) for name in sorted(betas.keys()): - print('packages for %s (%d):' % (name, len(betas[name]))) + print('\n==== packages for %s (%d) ====' % (name, len(betas[name]))) sorted_packages = sorted(betas[name]) for version, build, mtime, path in sorted_packages[:-1]: - print('unlink %s (%u)' % (path, mtime)) + print('remove %s (%u)' % (path, mtime)) if not dry_run: os.unlink(path) - print('keeping %s (%u)' % (sorted_packages[-1][3], sorted_packages[-1][2])) + print('[keep] %s (%u)' % (sorted_packages[-1][3], sorted_packages[-1][2])) if __name__ == '__main__':