* fix: remove: do not show safety switch msg when there is nothing to show

This commit is contained in:
Eray Özkural
2005-12-15 01:01:43 +00:00
parent 9706d894c8
commit 107c12268c
+1
View File
@@ -415,6 +415,7 @@ def remove(A):
if not ctx.get_option('bypass_safety'): if not ctx.get_option('bypass_safety'):
if ctx.componentdb.has_component('system.base'): if ctx.componentdb.has_component('system.base'):
refused = A.intersection(set(ctx.componentdb.get_component('system.base').packages)) refused = A.intersection(set(ctx.componentdb.get_component('system.base').packages))
if refused:
ctx.ui.warning(_('Safety switch: cannot remove the following packages in system.base: ') + ctx.ui.warning(_('Safety switch: cannot remove the following packages in system.base: ') +
util.strlist(refused)) util.strlist(refused))
A = A - set(ctx.componentdb.get_component('system.base').packages) A = A - set(ctx.componentdb.get_component('system.base').packages)