@@ -374,10 +374,12 @@ def add_parser(subparsers, *args, **kwargs):
374
374
375
375
parser_clean_download_cache = add_parser (subparsers ,
376
376
'clean_download_cache' , aliases = ['clean-download-cache' ],
377
- help = 'Delete any cached recipe downloads' ,
377
+ help = 'Delete cached downloads for requirement builds ' ,
378
378
parents = [generic_parser ])
379
- parser_clean_download_cache .add_argument ('recipe' ,
380
- help = 'The recipe name' )
379
+ parser_clean_download_cache .add_argument (
380
+ 'recipes' , nargs = '*' ,
381
+ help = ('The recipes to clean (space-separated). If no recipe name is '
382
+ 'provided, the entire cache is cleared.' ))
381
383
382
384
parser_export_dist = add_parser (subparsers ,
383
385
'export_dist' , aliases = ['export-dist' ],
@@ -597,21 +599,20 @@ def clean_download_cache(self, args):
597
599
This does *not* delete the build caches or final distributions.
598
600
'''
599
601
ctx = self .ctx
600
- msg = "Download cache removed!"
601
- if args .recipe :
602
- for package in args .recipe .split (',' ):
602
+ if args .recipes :
603
+ for package in args .recipes :
603
604
remove_path = join (ctx .packages_path , package )
604
605
if exists (remove_path ):
605
606
shutil .rmtree (remove_path )
606
- print ( msg [: - 1 ] + ' for: "{}"! ' .format (package ))
607
+ info ( 'Download cache removed for: "{}"' .format (package ))
607
608
else :
608
- print ('No download cache for "{}" found! ' .format (package ))
609
+ warning ('No download cache found for "{}", skipping ' .format (package ))
609
610
else :
610
611
if exists (ctx .packages_path ):
611
612
shutil .rmtree (ctx .packages_path )
612
- print ( msg )
613
+ info ( 'Download cache removed.' )
613
614
else :
614
- print ('Nothing found at "{}"' .format (ctx .packages_path ))
615
+ print ('No cache found at "{}"' .format (ctx .packages_path ))
615
616
616
617
@require_prebuilt_dist
617
618
def export_dist (self , args ):
0 commit comments