From efbd032da9917892b0b8a33cfe3fda99e2e42995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 24 Apr 2017 16:35:15 +0200 Subject: [PATCH] fix wipebinaries don't do a second wipe all after doing the intended wipe by a filter. Eg: osc wipebinaries home:adrianSuSE -r standard -a i586 --build-disabled wiped first --build-disabled only, but did a second wipe all afterwards --- osc/commandline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index a16fadbe..5d3c3680 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6800,8 +6800,10 @@ Please submit there instead, or use --nodevelproject to force direct submission. codes.append('broken') if opts.unresolvable: codes.append('unresolvable') - if opts.all or opts.repo or opts.arch: - codes.append(None) + if len(codes) == 0: + # don't do a second wipe if a filter got specified + if opts.all or opts.repo or opts.arch: + codes.append(None) if len(codes) == 0: raise oscerr.WrongOptions('No option has been provided. If you want to delete all binaries, use --all option.')