Mercurial > hg > octave-nkf
diff scripts/pkg/private/install.m @ 14471:d2c095e45196
maint: Remove redundant private function from the package manager.
* pkg/private/rm_rf.m: remove file.
* pkg/provate/build.m: remove calls to rm_rf.
* pkg/provate/configure_make.m: remove calls to rm_rf.
* pkg/provate/copy_files.m: remove calls to rm_rf.
* pkg/provate/finish_installation.m: remove calls to rm_rf.
* pkg/provate/install.m: remove calls to rm_rf.
* pkg/provate/packinfo_copy_file.m: remove calls to rm_rf.
* pkg/provate/prepare_installation.m: remove calls to rm_rf.
* pkg/provate/repackage.m: remove calls to rm_rf.
* pkg/provate/uninstall.m: remove calls to rm_rf.
author | Carlo de Falco <kingcrimson@tiscali.it> |
---|---|
date | Fri, 16 Mar 2012 18:55:09 +0100 |
parents | aad7ad0e15c1 |
children | a46b8b0bd325 |
line wrap: on
line diff
--- a/scripts/pkg/private/install.m +++ b/scripts/pkg/private/install.m @@ -144,7 +144,7 @@ catch ## Something went wrong, delete tmpdirs. for i = 1:length (tmpdirs) - rm_rf (tmpdirs{i}); + rmdir (tmpdirs{i}, "s"); endfor rethrow (lasterror ()); end_try_catch @@ -198,7 +198,7 @@ catch ## Something went wrong, delete tmpdirs. for i = 1:length (tmpdirs) - rm_rf (tmpdirs{i}); + rmdir (tmpdirs{i}, "s"); endfor rethrow (lasterror ()); end_try_catch @@ -217,7 +217,7 @@ catch ## Something went wrong, delete tmpdirs. for i = 1:length (tmpdirs) - rm_rf (tmpdirs{i}); + rmdir (tmpdirs{i}, "s"); endfor rethrow (lasterror ()); end_try_catch @@ -236,11 +236,11 @@ catch ## Something went wrong, delete tmpdirs. for i = 1:length (tmpdirs) - rm_rf (tmpdirs{i}); + rmdir (tmpdirs{i}, "s"); endfor for i = 1:length (descriptions) - rm_rf (descriptions{i}.dir); - rm_rf (getarchdir (descriptions{i})); + rmdir (descriptions{i}.dir, "s"); + rmdir (getarchdir (descriptions{i}), "s"); endfor rethrow (lasterror ()); end_try_catch @@ -251,8 +251,8 @@ if (dirempty (descriptions{i}.dir, {"packinfo", "doc"}) && dirempty (getarchdir (descriptions{i}))) warning ("package %s is empty\n", descriptions{i}.name); - rm_rf (descriptions{i}.dir); - rm_rf (getarchdir (descriptions{i})); + rmdir (descriptions{i}.dir, "s"); + rmdir (getarchdir (descriptions{i}), "s"); descriptions(i) = []; endif endfor @@ -296,10 +296,10 @@ catch ## Something went wrong, delete tmpdirs. for i = 1:length (tmpdirs) - rm_rf (tmpdirs{i}); + rmdir (tmpdirs{i}, "s"); endfor for i = 1:length (descriptions) - rm_rf (descriptions{i}.dir); + rmdir (descriptions{i}.dir, "s"); endfor if (global_install) printf ("error: couldn't append to %s\n", global_list); @@ -311,8 +311,8 @@ ## All is well, let's clean up. for i = 1:length (tmpdirs) - [status, msg] = rm_rf (tmpdirs{i}); - if (status != 1) + [status, msg] = rmdir (tmpdirs{i}, "s"); + if (status != 1 && exist (tmpdirs{i}, "dir")) warning ("couldn't clean up after my self: %s\n", msg); endif endfor