OEP:pkg: Difference between revisions

3 bytes added ,  21 July 2017
m
Fix some typos.
m (Fix some typos.)
Line 96: Line 96:
associated file just like the db files for the local installs. To load an external
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
package, the path for the db file needs to be passed to pkg and the db named (because
there may be more than onde db.
there may be more than one db.


These are most like the less used type of packages and will require a bit more
These are most like the less used type of packages and will require a bit more
Line 112: Line 112:


If the user decides to make a global package install (install the package using pkg while
If the user decides to make a global package install (install the package using pkg while
runnig Octave with sudo), then he's trying to act as system administrator and should know
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
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
is meant to be handled by the system packaging tool. It is just not possible to make pkg
Line 134: Line 134:
Also, supporting multiple packages versions means that the word "all" to refer to all
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?
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 db, which one should
And if there's multiple packages with the same version on various db, which one should
be loaded? I'd propose the default to be:
be loaded? I'd propose the default to be:


- load the latest version availale
- load the latest version available
- load the local install of the package
- load the local install of the package
- load the global install of the package
- load the global install of the package
Line 143: Line 143:


For package names, the proposal is to limit package names to the same as variable
For package names, the proposal is to limit package names to the same as variable
names (makes it even easier to check validaity with isvarname). So package name
names (makes it even easier to check validity with isvarname). So package name
must start with a letter, and otherwise be comprised of alphanumeric and underscores
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
characters. Unlike variable names, package names will not be case sensitive since
Line 155: Line 155:
Actions dependent on a package version can be specified with a -version modifier for that
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
action. It is however necessary to define the default order. Comparison operators
should be used to specify versions. If no comparsion is use then greater than or
should be used to specify versions. If no comparison is use then greater than or
equal is assumed. So that the following:
equal is assumed. So that the following:


Line 165: Line 165:
: same as not specifying comparison
: same as not specifying comparison
;pkg load -version >1.0.5 image
;pkg load -version >1.0.5 image
: load anything above that version (does it make sense supportung this? It's not a lot of trouble...)
: load anything above that version (does it make sense supporting this? It's not a lot of trouble...)
;pkg load -version =1.0.5 image
;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 image package only if the same version (should we use == instead? Why not only =? Should not support both syntax)
Line 171: Line 171:
: load any image package available except 1.0.5 (because regressions do exist)
: load any image package available except 1.0.5 (because regressions do exist)


For the other 2 remainig comparisons (< and <=), the question used for > and >=
For the other 2 remaining comparisons (< and <=), the question used for > and >=
is the same. Does it make sense to support both? For ''greater than'', the only
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
thing that makes sense is ''greater than or equal'' and for ''lesser than'', the
Line 264: Line 264:
While using Octave 3.6.2, Denise installs the new version of the package
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
"pkg install -forge financial".  The files for the previous version of the package
are kept altough "pkg load financial" will only load the latest version. However, when
are kept 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
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.
will only load financial 1.0.4.