From fc2535a715b4bae302abe4918477d900fea08383 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Thu, 1 Mar 2018 16:36:39 +0100
Subject: [PATCH] Minor cosmetic changes to the clean-betas.py script

---
 conda/clean-betas.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/conda/clean-betas.py b/conda/clean-betas.py
index 5c3559f..1c1a0f2 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__':
-- 
GitLab