Changes

Jump to navigation Jump to search

OEP:pkg

778 bytes added, 11 June
Warn about old, maybe outdated, content. File contains some dead links.
{{Warning|This page has not been revisited since 2014. Please refer to the GNU Octave manual for information about {{manual|pkg}}.}}
 
== Abstract ==
This OEP refers to Octave's design of the pkg system. The purpose of this system
See the user cases section below for several examples.
 
The definition of a package manager according to wikipedia:
 
* Verifying file checksums to ensure correct and complete packages;
* Verifying digital signatures to authenticate the origin of packages;
* Applying file archivers to manage encapsulated files;
* Upgrading software with latest versions, typically from a software repository;
* Grouping of packages by function to reduce user confusion;
* Managing dependencies to ensure a package is installed with all packages it requires. This resolved the problem known as Dependency Hell.
== Available vs Loaded ==
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 (because
there may be more than onde one db.
These are most like the less used type of packages and will require a bit more
If the user decides to make a global package install (install the package using pkg while
runnig running Octave with sudo), then he's trying to act as system administrator and should know
what he's doing. If he breaks it, its his own fault. Installation of system-wide software
is meant to be handled by the system packaging tool. It is just not possible to make pkg
Also, supporting multiple packages versions means that the word "all" to refer to all
packages has new limitations. Should we load only the latest version of each package?
And if there's multiple packages with the same version on varios various db, which one should
be loaded? I'd propose the default to be:
- load the latest version availaleavailable
- load the local install of the package
- load the global install of the package
For package names, the proposal is to limit package names to the same as variable
names (makes it even easier to check validaity validity with isvarname). So package name
must start with a letter, and otherwise be comprised of alphanumeric and underscores
characters. Unlike variable names, package names will not be case sensitive since
Actions dependent on a package version can be specified with a -version modifier for that
action. It is however necessary to define the default order. Comparison operators
should be used to specify versions. If no comparsion comparison is use then greater than or
equal is assumed. So that the following:
: same as not specifying comparison
;pkg load -version >1.0.5 image
: load anything above that version (does it make sense supportung supporting this? It's not a lot of trouble...)
;pkg load -version =1.0.5 image
: load image package only if the same version (should we use == instead? Why not only =? Should not support both syntax)
: load any image package available except 1.0.5 (because regressions do exist)
For the other 2 remainig remaining comparisons (< and <=), the question used for > and >=
is the same. Does it make sense to support both? For ''greater than'', the only
thing that makes sense is ''greater than or equal'' and for ''lesser than'', the
While using Octave 3.6.2, Denise installs the new version of the package
"pkg install -forge financial". The files for the previous version of the package
are kept altough although "pkg load financial" will only load the latest version. However, when
Denise is using Octave 3.4.3, as financial 1.2.0 requires Octave 3.6.0, pkg load
will only load financial 1.0.4.
dependencies automatically, a message showing which packages will be installed
is displayed before doing it.
 
=== User case #7: Package testing ===
"pkg test" command that would run all tests for a given package.
== Where to install things ==
These should not be hardcoded and taken from octave_config_info. There's many paths there whose purpose is explained on octave sources [http://hg.savannah.gnu.org/hgweb/octave/file/default/build-aux/common.mk buil-aux/common.mk] (see the ''Where To Install Things'' and ''Octave-specific directories'' sections on that file.)
[[Category:DevelopmentPackages]]

Navigation menu