java/code/src/com/redhat/rhn/domain/channel/Channel.java | 24 ++++++++++
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 14 +++++
2 files changed, 36 insertions(+), 2 deletions(-)
New commits:
commit d114bf889a640045e82b737daf04e539b064765b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 22 13:54:26 2010 +0100
642226 - do not look for the VT channel in case of RHEL6 base channels
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index 5740444..1827e96 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -134,6 +134,30 @@ public class Channel extends BaseDomainHelper implements Comparable
{
}
/**
+ * Returns true if this Channel is a Rhel channel.
+ * @return true if this Channel is a Rhel channel.
+ */
+ public boolean isRhelChannel() {
+ return org == null;
+ }
+
+ /**
+ * Returns true if this channel is of specified release (f.e. RHEL6)
+ * @param ver release version
+ * @return true if this channel is of specified release
+ */
+ public boolean isReleaseXChannel(Integer ver) {
+ if (getDistChannelMaps() != null) {
+ for (DistChannelMap map : getDistChannelMaps()) {
+ if (map.getRelease().contains(ver.toString())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
* @return Returns the baseDir.
*/
public String getBaseDir() {
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index 4b74050..cce17e3 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -1551,9 +1551,19 @@ public class SystemManager extends BaseManager {
User user = UserFactory.findRandomOrgAdmin(orgIn);
ValidatorResult result = new ValidatorResult();
- // If this is a Satellite, subscribe to the virt channel if possible:
+ // If this is a Satellite
if (!ConfigDefaults.get().isSpacewalk()) {
- subscribeToVirtChannel(server, user, result);
+ // just install libvirt for RHEL6 base channel
+ Channel base = server.getBaseChannel();
+ if ((base != null) &&
+ base.isRhelChannel() &&
+ base.isReleaseXChannel(6)) {
+ // do some actions for RHEL6
+ }
+ else {
+ // otherwise subscribe to the virt channel if possible
+ subscribeToVirtChannel(server, user, result);
+ }
}
// Before we start looking to subscribe to a 'tools' channel for
Show replies by date