lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r896278 - in /lucene/lucy/trunk/charmonizer/src/Charmonizer: Core/Compiler.c Core/Dir.c Core/Dir.h Probe.c Probe/LargeFiles.c
Date Tue, 05 Jan 2010 23:48:35 GMT
Author: marvin
Date: Tue Jan  5 23:48:30 2010
New Revision: 896278

URL: http://svn.apache.org/viewvc?rev=896278&view=rev
Log:
Have Charmonizer be more fastidious about cleaning up some temp files.

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.h
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c?rev=896278&r1=896277&r2=896278&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c Tue Jan  5 23:48:30 2010
@@ -141,8 +141,11 @@
         system(command);
     }
 
-    /* See if compilation was successful. */
+    /* See if compilation was successful.  Remove the source file. */
     result = Util_can_open_file(exe_file);
+    if (!Util_remove_and_verify(source_path)) {
+        Util_die("Failed to remove '%s'", source_path);
+    }
 
     free(command);
     free(inc_dir_string);
@@ -186,8 +189,11 @@
         system(command);
     }
 
-    /* See if compilation was successful. */
+    /* See if compilation was successful.  Remove the source file. */
     result = Util_can_open_file(obj_file);
+    if (!Util_remove_and_verify(source_path)) {
+        Util_die("Failed to remove '%s'", source_path);
+    }
 
     free(command);
     free(inc_dir_string);

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c?rev=896278&r1=896277&r2=896278&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c Tue Jan  5 23:48:30 2010
@@ -135,6 +135,17 @@
     }
 }
 
+void
+Dir_clean_up(void)
+{
+    if (!Util_remove_and_verify("_charm_mkdir")) {
+        Util_die("Failed to remove '_charm_mkdir'");
+    }
+    if (!Util_remove_and_verify("_charm_rmdir")) {
+        Util_die("Failed to remove '_charm_rmdir'");
+    }
+}
+
 chaz_bool_t
 Dir_mkdir(const char *filepath)
 {

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.h
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.h?rev=896278&r1=896277&r2=896278&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.h (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.h Tue Jan  5 23:48:30 2010
@@ -16,6 +16,11 @@
 void
 chaz_Dir_init(void);
 
+/* Tear down.
+ */
+void
+chaz_Dir_clean_up(void);
+
 /* Attempt to create a directory.  Returns true on success, false on failure.
  */
 chaz_bool_t
@@ -35,6 +40,7 @@
 
 #ifdef CHAZ_USE_SHORT_NAMES
   #define Dir_init              chaz_Dir_init
+  #define Dir_clean_up          chaz_Dir_clean_up
   #define Dir_mkdir             chaz_Dir_mkdir
   #define Dir_rmdir             chaz_Dir_rmdir
   #define Dir_mkdir_command     chaz_Dir_mkdir_command

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c?rev=896278&r1=896277&r2=896278&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe.c Tue Jan  5 23:48:30 2010
@@ -6,6 +6,7 @@
 #include "Charmonizer/Probe.h"
 #include "Charmonizer/Core/HeaderChecker.h"
 #include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Core/Dir.h"
 #include "Charmonizer/Core/Util.h"
 #include "Charmonizer/Core/Compiler.h"
 #include "Charmonizer/Core/OperatingSystem.h"
@@ -39,6 +40,7 @@
     ConfWriter_clean_up();
     CC_clean_up();
     OS_clean_up();
+    Dir_clean_up();
 
     if (Util_verbosity) { printf("Cleanup complete.\n"); }
 }

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c?rev=896278&r1=896277&r2=896278&view=diff
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c Tue Jan  5 23:48:30 2010
@@ -218,6 +218,10 @@
         free(output);
     }
 
+    if (!Util_remove_and_verify("_charm_off64")) {
+        Util_die("Failed to remove '_charm_off64'");
+    }
+
     return success;
 }
 
@@ -255,6 +259,10 @@
         free(output);
     }
 
+    if (!Util_remove_and_verify("_charm_lseek")) {
+        Util_die("Failed to remove '_charm_lseek'");
+    }
+
     free(code_buf);
     return success;
 }



Mime
View raw message