java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java | 28 +++++-----
1 file changed, 16 insertions(+), 12 deletions(-)
New commits:
commit 879273153fe9867d423baee3397e59a2a273658c
Author: Stephen Herr <sherr(a)redhat.com>
Date: Thu Mar 29 16:06:23 2012 -0400
808210 - Fixing ISE on selecting None yum checksum type for channel
diff --git a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
index 83904e2..28a2d95 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
@@ -88,8 +88,8 @@ public class UpdateChannelCommand extends CreateChannelCommand {
* valid base channel.
*/
public Channel update(Long cid)
- throws InvalidChannelLabelException, InvalidChannelNameException,
- InvalidParentChannelException {
+ throws InvalidChannelLabelException, InvalidChannelNameException,
+ InvalidParentChannelException {
verifyRequiredParameters();
verifyChannelName(name);
@@ -107,17 +107,21 @@ public class UpdateChannelCommand extends CreateChannelCommand {
throw new IllegalArgumentException("Invalid architecture label");
}
- ChecksumType ct = ChannelFactory.findChecksumTypeByLabel(checksum);
- if (ct == null) {
- throw new InvalidChecksumLabelException(checksum);
+ ChecksumType ct = null;
+ // RHEL <= 4 does not use yum and therefore does not have a checksum
+ if (!checksum.equals("")) {
+ ct = ChannelFactory.findChecksumTypeByLabel(checksum);
+ if (ct == null) {
+ throw new InvalidChecksumLabelException(checksum);
+ }
+ if (checksumChanged(c.getChecksumTypeLabel(), ct) &&
+ c.getPackageCount() > 0) {
+ // schedule repo re generation if the checksum type changed
+ // and the channel has packages
+ ChannelManager.queueChannelChange(c.getLabel(),
+ "java::updateChannelCommon", null);
+ }
}
- if (checksumChanged(c.getChecksumTypeLabel(), ct) && c.getPackageCount()
> 0) {
- // schedule repo re generation if the checksum type changed
- // and the channel has packages
- ChannelManager.queueChannelChange(c.getLabel(),
- "java::updateChannelCommon", null);
- }
-
c.setName(name);
c.setSummary(summary);
c.setDescription(description);
Show replies by date