octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small fix to make pkg more robust


From: David Bateman
Subject: Small fix to make pkg more robust
Date: Tue, 17 Oct 2006 10:22:47 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

The following small fix allows the package directory to be missing on an
uninstall, and have the package be removed properly. This insures
against user error, where the user removes the package directory, but
not the corresponding .octave_packages file. This will allow the package
to be removed in any case..

D.

2006-10-17  David Bateman  <address@hidden>

    * pkg/pkg.m (uninstall): Allow the uninstall to proceed even if
    the package directory is missing.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

*** scripts/pkg/pkg.m.~1.21.~   2006-10-09 21:41:17.000000000 +0200
--- scripts/pkg/pkg.m   2006-10-17 10:09:25.322466621 +0200
***************
*** 462,471 ****
          endif
          ## Do the actual deletion
          rmpath(desc.dir);
!         [status, msg] = rm_rf(desc.dir);
!         if (status != 1)
              error("Couldn't delete directory %s: %s", desc.dir, msg);
!         endif
      endfor
  
      ## Write a new ~/.octave_packages
--- 462,475 ----
          endif
          ## Do the actual deletion
          rmpath(desc.dir);
!       if (exist (desc.dir, "dir"))
!           [status, msg] = rm_rf(desc.dir);
!           if (status != 1)
              error("Couldn't delete directory %s: %s", desc.dir, msg);
!           endif
!       else
!         warning("Directory %s previously lost", desc.dir);
!       endif
      endfor
  
      ## Write a new ~/.octave_packages

reply via email to

[Prev in Thread] Current Thread [Next in Thread]