directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r670463 - /directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
Date Mon, 23 Jun 2008 07:46:11 GMT
Author: pamarcelot
Date: Mon Jun 23 00:46:10 2008
New Revision: 670463

URL: http://svn.apache.org/viewvc?rev=670463&view=rev
Log:
Fixed a bug with the destination of the generated package.

Modified:
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=670463&r1=670462&r2=670463&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
Mon Jun 23 00:46:10 2008
@@ -146,17 +146,17 @@
         }
 
         // Copying the instances in the '/var/lib/apacheds-$VERSION/default' directory
-        File debDefaultInstanceDirectory = new File( pkgRootDirectory, "var/lib/apacheds-"
+        File defaultInstanceDirectory = new File( pkgRootDirectory, "var/lib/apacheds-"
             + target.getApplication().getVersion() + "/default" );
-        debDefaultInstanceDirectory.mkdirs();
-        File debDefaultInstanceConfDirectory = new File( debDefaultInstanceDirectory, "conf"
);
+        defaultInstanceDirectory.mkdirs();
+        File debDefaultInstanceConfDirectory = new File( defaultInstanceDirectory, "conf"
);
         debDefaultInstanceConfDirectory.mkdirs();
-        new File( debDefaultInstanceDirectory, "ldif" ).mkdirs();
-        new File( debDefaultInstanceDirectory, "log" ).mkdirs();
-        new File( debDefaultInstanceDirectory, "partitions" ).mkdirs();
-        new File( debDefaultInstanceDirectory, "run" ).mkdirs();
-        File debEtcInitdDirectory = new File( pkgRootDirectory, "etc/init.d" );
-        debEtcInitdDirectory.mkdirs();
+        new File( defaultInstanceDirectory, "ldif" ).mkdirs();
+        new File( defaultInstanceDirectory, "log" ).mkdirs();
+        new File( defaultInstanceDirectory, "partitions" ).mkdirs();
+        new File( defaultInstanceDirectory, "run" ).mkdirs();
+        File etcInitdDirectory = new File( pkgRootDirectory, "etc/init.d" );
+        etcInitdDirectory.mkdirs();
         new File( pkgRootDirectory, "/var/run/apacheds-" + target.getApplication().getVersion()
).mkdirs();
         try
         {
@@ -174,15 +174,14 @@
                     "server.xml" ), false );
 
             // Copying the init script in /etc/init.d/
-            MojoHelperUtils
-                .copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"apacheds-init" ), new File(
-                    debEtcInitdDirectory, "apacheds-" + target.getApplication().getVersion()
+ "-default" ), true );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"apacheds-init" ),
+                new File( etcInitdDirectory, "apacheds-" + target.getApplication().getVersion()
+ "-default" ), true );
         }
         catch ( IOException e )
         {
             log.error( e.getMessage() );
             throw new MojoFailureException( "Failed to copy resources files to the PKG directory
("
-                + debDefaultInstanceDirectory + ")" );
+                + defaultInstanceDirectory + ")" );
         }
 
         // Copying the 'pkg' files 
@@ -190,7 +189,7 @@
         {
             MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"Prototype" ),
                 new File( pkgDirectory, "Prototype" ), true );
-            
+
             MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"pkginfo" ),
                 new File( pkgDirectory, "pkginfo" ), true );
 
@@ -206,7 +205,10 @@
             throw new MojoFailureException( "Failed to copy DEB 'control' file." );
         }
 
-        // Generating the DMG
+        // Creating the target folder
+        new File( pkgRootDirectory, "target" ).mkdir();
+
+        // Generating the PKG
         log.info( "Generating Solaris PKG Installer" );
         String finalName = target.getFinalName();
         if ( !finalName.endsWith( ".pkg" ) )



Mime
View raw message