directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r374303 - /directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
Date Thu, 02 Feb 2006 08:45:29 GMT
Author: akarasulu
Date: Thu Feb  2 00:45:26 2006
New Revision: 374303

URL: http://svn.apache.org/viewcvs?rev=374303&view=rev
Log:
correcting issues with rpm not accepting the "-" in the version name

Modified:
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=374303&r1=374302&r2=374303&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
Thu Feb  2 00:45:26 2006
@@ -187,7 +187,8 @@
 
         if ( target.getApplication().getVersion() != null )
         {
-            filterProperties.put( "app.version", target.getApplication().getVersion() );
+            String version = target.getApplication().getVersion().replace( '-', '_' );
+            filterProperties.put( "app.version", version );
         }
         else
         {
@@ -215,7 +216,7 @@
         else
         {
             String finalName = target.getApplication().getName() 
-                + "-" + target.getApplication().getVersion() + "-win32-setup.exe"; 
+                + "-" + target.getApplication().getVersion() + "-linux-i386.rpm"; 
             filterProperties.put( "app.final.name" , finalName );
         }
         
@@ -293,7 +294,8 @@
 
     private void buildSourceTarball() throws MojoFailureException
     {
-        String dirname = target.getApplication().getName() + "-" + target.getApplication().getVersion();
+        String version = target.getApplication().getVersion().replace( '-', '_' );
+        String dirname = target.getApplication().getName() + "-" + version;
         File sourcesDir = new File( target.getLayout().getBaseDirectory().getParentFile(),
dirname );
         try
         {
@@ -308,7 +310,7 @@
         String[] cmd = new String[] {
             "tar", "-zcvf", 
             "/usr/src/redhat/SOURCES/" + target.getApplication().getName() 
-            + "-" + target.getApplication().getVersion() + ".tar.gz",
+            + "-" + version + ".tar.gz",
             sourcesDir.getAbsolutePath()
         };
         



Mime
View raw message