Changes

Jump to navigation Jump to search

OEP:pkg

1,737 bytes added, 12:48, 18 November 2012
no edit summary
== Available vs Loaded ==
To avoid problems reading thuis this document, the distinction between having a package available andloadeda package loaded will should be done from the startearly. An available package is a package that is currentlyavailable to pkg to loadloading, unload unloading or reinstall. It is already installed but not necessarily loaded. 
A loaded package is an installed package whose functions have been added to Octave's function search
path.
=== Global installs ===
Packages installed globally will be available to everyone from startup. This is thetype of package installation that a system administrator would do for example. The meaning of global here is relative to the Octave installationthough. If an Octave installation is local(installed by a user in ~/usr/local), a globalinstallationinstallation of a package will still place its files in the home directory of the user (something likein~/usr/local/ or whatever was defined when running Octave's installation configure scriptas well). Anyone runningthis Octave A global installation will have them available is performed automatically if the user installing the packagehas write permissions to those directories (not loadedlocalfcnfiledir and localapioctfiledir) from Octave startup.In case it has no permissions, a local package installation is performed instead.
A package globally installed is available globally to that
=== Local installs ===
Local packages are specific to a user. They are located in that user home directory
into ann .octave directory. As with global package installations, they are available
from startup. Unlike global, they are user specific, only available to the user that
installed it. A local install for a user can be an external install for some other
user.
 
=== External installs ===
These are like local packages but in a non-standard location. Octave does not know
about this installations at startup even if the installation was done with the same
Octave version. These can be packages installed in a filesystem that is not always
mounted, local packages installs from another user in the same system, or anything
else really.
 
An external package was installed with pkg, it is simply not constantly tracked down
by Octave. An external package install will have a .db associated file just like the
.db files for the local installs. To load an external package, the path for the .db
file needs to be passed to pkg and the db named. Then packages from there can be
loaded.
 
For example, after starting an Octave session, one can load two .db files. One is
the labdev (/mnt/labdev/octave_packages.db) and the other is the friendA
(/home/friendA/.octave/octave_packages.db). Once these two external db are loaded,
the packages associated with it are made available to pkg and can be loaded normally.
It's possible that the same package name and version exists in both dbs hence the
need to name them (so it's possible to specify from which one should a package be loaded).
== Package names ==
be loaded? I'd propose the default to be:
# - load the latest version availale# - load the local install of the package# - load the global install of the package# - load the package from the external .db, starting from the latest added in case there's more than one.
For package names, the proposal is to limit package names to the same as variable
sensitive (creating directories named Image and image would not be possible in FAT
systems).
 
== User cases ==

Navigation menu