backend/satellite_tools/spacewalk-remove-channel | 40 ++++++++++++-----------
1 file changed, 21 insertions(+), 19 deletions(-)
New commits:
commit 4bd2be58dc7da4a43804bd3cf7c8610e5afe284f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Nov 25 10:11:51 2010 +0100
don't require server unsubscribe when --skip-channels is used
diff --git a/backend/satellite_tools/spacewalk-remove-channel
b/backend/satellite_tools/spacewalk-remove-channel
index 7e58ab0..62f1dd9 100755
--- a/backend/satellite_tools/spacewalk-remove-channel
+++ b/backend/satellite_tools/spacewalk-remove-channel
@@ -107,30 +107,32 @@ def main():
if not dict_label.has_key(channel):
print "Unknown channel %s" % channel
return -1
- # Sanity check: verify subchannels are deleted as well if base
- # channels are selected
- if not dict_parents.has_key(channel):
- continue
- # this channel is a parent channel?
- children = []
- for subch in dict_parents[channel]:
- if not channels.has_key(subch):
- child_test_fail = True
- children.append(subch)
- if children:
- print "Error: cannot remove channel %s: subchannel(s) exist: " %(
- channel)
- for child in children:
- print "\t\t\t" + child
+ if not options.skip_channels:
+ # Sanity check: verify subchannels are deleted as well if base
+ # channels are selected
+ if not dict_parents.has_key(channel):
+ continue
+ # this channel is a parent channel?
+ children = []
+ for subch in dict_parents[channel]:
+ if not channels.has_key(subch):
+ child_test_fail = True
+ children.append(subch)
+ if children:
+ print "Error: cannot remove channel %s: subchannel(s) exist: "
%(
+ channel)
+ for child in children:
+ print "\t\t\t" + child
if child_test_fail:
return -1
- if __serverCheck(channels.keys(), options.unsubscribe):
- return -1
+ if not options.skip_channels
+ if __serverCheck(channels.keys(), options.unsubscribe):
+ return -1
- if __kickstartCheck(channels.keys()):
- return -1
+ if __kickstartCheck(channels.keys()):
+ return -1
try:
Show replies by date