aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Guzman2013-07-31 13:36:50 (EDT)
committerCamilo Bernal2013-08-01 11:01:04 (EDT)
commite3e66bb02987d72feef3f0cf98e3147c7278ac81 (patch)
treeecc94e5a23d5ff2c5754c8024b3455c0d87335b6
parentca7de2040df7ffe3750b7f390721250f2188aa00 (diff)
downloadorg.eclipse.linuxtools-e3e66bb02987d72feef3f0cf98e3147c7278ac81.zip
org.eclipse.linuxtools-e3e66bb02987d72feef3f0cf98e3147c7278ac81.tar.gz
org.eclipse.linuxtools-e3e66bb02987d72feef3f0cf98e3147c7278ac81.tar.bz2
RPMStubby: Proper names and definerefs/changes/24/15024/2
Changed names accordingly rather than prepending "eclipse-" to everything. Also fixed up javadocs for some methods and changed the define in python to use the simple package name rather than the prepended name. Change-Id: I5fe5ac8dbaa2fbec41de43ac57d2e2b2d4c78dd9 Signed-off-by: Neil Guzman <nguzman@redhat.com> Reviewed-on: https://git.eclipse.org/r/15024 Tested-by: Hudson CI Reviewed-by: Camilo Bernal <cabernal@redhat.com> IP-Clean: Camilo Bernal <cabernal@redhat.com> Tested-by: Camilo Bernal <cabernal@redhat.com>
-rw-r--r--rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java2
-rw-r--r--rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java6
-rw-r--r--rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java6
3 files changed, 9 insertions, 5 deletions
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java
index f8e26a6..69d26b8 100644
--- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java
+++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java
@@ -89,7 +89,7 @@ public class StubbyEggGenerator extends AbstractGenerator {
buffer.append("%else\n");
buffer.append("%{!?python_sitelib: %global python_sitelib %(%{__python} -c \"from distutils.sysconfig import get_python_lib; print (get_python_lib())\")}\n");
buffer.append("%endif\n\n");
- buffer.append("%global srcname " + model.getPackageName().toLowerCase() +"\n\n");
+ buffer.append("%global srcname " + model.getSimplePackageName().toLowerCase() +"\n\n");
}
/**
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java
index 25c87b9..6af46ea 100644
--- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java
+++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java
@@ -139,7 +139,7 @@ public class EggModel {
}
/**
- * The simple package name with "eclipse-" prepended to make better RPM package name.
+ * The simple package name with "python-" prepended to make better RPM package name.
*
* @return The package
*/
@@ -152,9 +152,9 @@ public class EggModel {
}
/**
- * Returns the version as retrieved by /feature/@version xpath with .qualifier removed if any.
+ * Returns the version
*
- * @return The version of the feature.
+ * @return The version
*/
public String getVersion() {
String version = getValue(CommonMetaData.VERSION);
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java
index bc4d4ce..94b5a63 100644
--- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java
+++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java
@@ -162,7 +162,11 @@ public class GemModel {
* @return The package
*/
public String getPackageName() {
- return "rubygem-" + getSimplePackageName();
+ String simpleName = getSimplePackageName();
+ if (simpleName.startsWith("rubygem-")) {
+ return simpleName;
+ }
+ return "rubygem-"+simpleName;
}
/**