java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebRepositoryWriter.java | 12 --
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 9 -
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RpmRepositoryWriter.java | 59 ----------
3 files changed, 4 insertions(+), 76 deletions(-)
New commits:
commit 9aae204b9e3b4975690460dd3b8108d4855b7392
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Sat Apr 30 21:26:27 2011 +0200
Remove the static comps file mapping for RHEL 5.0 trees
Static mappings were introduced by bug 247156, but they
are no longer needed since the bug 585233 is resolved.
In any case, static mappings should not have precedence
over the cloned-channel loop.
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebRepositoryWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebRepositoryWriter.java
index 3c4d691..04ef7c4 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebRepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebRepositoryWriter.java
@@ -84,16 +84,4 @@ public class DebRepositoryWriter extends RepositoryWriter {
}
writer.generatePackagesGz();
}
-
- /**
- * TODO: This static comps paths should go away once
- * we can get the paths directly from hosted through
- * satellite-sync and only limit to supporting cloned,
- * there are no comps files for debian.
- * @param channel channel object
- * @return compsPath comps file path
- */
- public String getCompsFilePath(Channel channel) {
- return null;
- }
}
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index ba68b57..31eeb74 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -55,15 +55,6 @@ public abstract class RepositoryWriter {
public abstract void writeRepomdFiles(Channel channel);
/**
- * TODO: This static comps paths should go away once
- * we can get the paths directly from hosted through
- * satellite-sync and only limit to supporting cloned.
- * @param channel channel object
- * @return compsPath comps file path
- */
- public abstract String getCompsFilePath(Channel channel);
-
- /**
* Deletes repository cache files
* @param channelLabelToProcess channel label
* @param deleteDir directory to delete
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RpmRepositoryWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RpmRepositoryWriter.java
index 3ce591f..6190147 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RpmRepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RpmRepositoryWriter.java
@@ -274,24 +274,18 @@ public class RpmRepositoryWriter extends RepositoryWriter {
}
private String getCompsRelativeFilename(Channel channel) {
- String relativeFilename = null;
-
- if (channel.getComps() == null) {
- relativeFilename = getCompsFilePath(channel);
- }
- else {
- relativeFilename = channel.getComps().getRelativeFilename();
+ if (channel.getComps() != null) {
+ return channel.getComps().getRelativeFilename();
}
-
// if we didn't find anything, let's check channel's original
- if (relativeFilename == null && channel.isCloned()) {
+ if (channel.isCloned()) {
// use a hack not to use ClonedChannel and it's getOriginal() method
Long originalChannelId = ChannelManager.lookupOriginalId(channel);
Channel originalChannel = ChannelFactory.lookupById(originalChannelId);
return getCompsRelativeFilename(originalChannel);
}
- return relativeFilename;
+ return null;
}
/**
@@ -343,51 +337,6 @@ public class RpmRepositoryWriter extends RepositoryWriter {
}
/**
- * TODO: This static comps paths should go away once
- * we can get the paths directly from hosted through
- * satellite-sync and only limit to supporting cloned.
- * @param channel channel object
- * @return compsPath comps file path
- */
- public String getCompsFilePath(Channel channel) {
- String compsPath = null;
-
- Map<String, String> compsMapping = new HashMap<String, String>();
- String rootClientPath = "/rhn/kickstart/ks-rhel-x86_64-client-5";
- String rootServerPath = "/rhn/kickstart/ks-rhel-x86_64-server-5";
- compsMapping.put("rhel-x86_64-client-5",
- rootClientPath + "/Client/repodata/comps-rhel5-client-core.xml");
- compsMapping.put("rhel-x86_64-client-vt-5",
- rootClientPath + "/VT/repodata/comps-rhel5-vt.xml");
- compsMapping.put("rhel-x86_64-client-workstation-5",
- rootClientPath + "/Workstation/repodata/comps-rhel5-client-workstation.xml");
- compsMapping.put("rhel-x86_64-server-5",
- rootServerPath + "/Server/repodata/comps-rhel5-server-core.xml");
- compsMapping.put("rhel-x86_64-server-vt-5",
- rootServerPath + "/VT/repodata/comps-rhel5-vt.xml");
- compsMapping.put("rhel-x86_64-server-cluster-5",
- rootServerPath + "/Cluster/repodata/comps-rhel5-cluster.xml");
- compsMapping.put("rhel-x86_64-server-cluster-storage-5",
- rootServerPath + "/ClusterStorage/repodata/comps-rhel5-cluster-st.xml");
-
- String[] arches = {"i386", "ia64", "s390x", "ppc"};
- Map<String, String> newCompsmap = new HashMap<String, String>();
- for (String k : compsMapping.keySet()) {
- for (String arch : arches) {
- newCompsmap.put(k.replace("x86_64", arch),
- compsMapping.get(k).replace("x86_64", arch));
- }
- }
- compsMapping.putAll(newCompsmap);
-
- if (compsMapping.containsKey(channel.getLabel())) {
- compsPath = compsMapping.get(channel.getLabel());
- }
-
- return compsPath;
- }
-
- /**
* Generates update info for given channel
* @param channel channel info
* @param prefix repodata file prefix