[wishlist] pkg require

David Bateman David.Bateman at motorola.com
Thu Oct 23 08:50:24 CDT 2008


Francesco Potorti` wrote:
> Since, at least in 3.0, 'pg load' is so slow, even if the package is
> already loaded, would it make sense to allow for loading a package if
> not already loaded?
>
> Solution 1: 'pkg load' should only load a package if not already loaded,
> unless an option -force is given that reloads the package.
>
> Solution 2: 'pkg load' accept a -require option which loads the package
> only if not already loaded.
>
> Solution 3: 'pkg require' loads a package only if not already loaded.
>
>   
Its not that simple.. "pkg load <package>" doesn't reload a package (ie 
install on the path) if it is already installed. However, what it does 
do is recursive check all of the dependencies of <package> to see if 
they are loaded, and is very careful of the order in which packages are 
placed on the path to handle the case that two packages install a 
function with the same name or that the newly loaded package uses the 
dependent package in its PKG_ADD file..

I'd be happy to see "pkg" sped up, but am unsure of the best way to go 
about this..

D.


-- 
David Bateman                                David.Bateman at motorola.com
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



More information about the Bug-octave mailing list