Revision: 9983
http://octave.svn.sourceforge.net/octave/?rev=9983&view=rev
Author: carandraug
Date: 2012-03-21 00:13:56 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
io: added post_install script. Workaround to remove PKG_ADD file from oct directory after package installation
Added Paths:
-----------
trunk/octave-forge/main/io/post_install.m
Added: trunk/octave-forge/main/io/post_install.m
===================================================================
--- trunk/octave-forge/main/io/post_install.m (rev 0)
+++ trunk/octave-forge/main/io/post_install.m 2012-03-21 00:13:56 UTC (rev 9983)
@@ -0,0 +1,14 @@
+## this function removes the PKG_ADD script from the .oct directory of the io
+## package after installation. The reason is that PKG_ADD calls chk_spreadsheet_support
+## which belongs to the io package itself. While it is ok when called from the
+## .m directory (since chk_spreadsheet_support is there), when called from the
+## .oct directory it fails since the package hasn't been loaded yet
+
+function post_install (desc)
+ file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
+ "-", octave_config_info ("api_version"), filesep, "PKG_ADD");
+ [err, msg] = unlink (file);
+ if (err)
+ warning ("Unable to remove PKG_ADD: %S", msg);
+ endif
+endfunction
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|