Editing OEP:pkg
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Abstract == | == Abstract == | ||
This OEP refers to Octave's design of the pkg system. The purpose of this system | This OEP refers to Octave's design of the pkg system. The purpose of this system | ||
Line 27: | Line 25: | ||
See the user cases section below for several examples. | See the user cases section below for several examples. | ||
== Available vs Loaded == | == Available vs Loaded == | ||
Line 98: | Line 87: | ||
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 | there may be more than onde 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 114: | Line 103: | ||
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 | |||
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 121: | Line 110: | ||
== Package names == | == Package names == | ||
For the parsing of the commands and files, some limitations on package names are required. This will | For the parsing of the commands and files, some limitations on package names are required. This will | ||
limit what pkg commands can do. For example, if a package name is allowed to use | limit what pkg commands can do. For example, if a package name is allowed to use score, then | ||
commands such as "pkg load image-2.0.0" can no longer be used to load a specific package version. | commands such as "pkg load image-2.0.0" can no longer be used to load a specific package version. | ||
Something such as "pkg load image::2.0.0" would have to be used. Using this alternative syntax | Something such as "pkg load image::2.0.0" would have to be used. Using this alternative syntax | ||
Line 136: | Line 125: | ||
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 | And if there's multiple packages with the same version on varios 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 | - load the latest version availale | ||
- 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 145: | Line 134: | ||
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 | names (makes it even easier to check validaity 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 151: | Line 140: | ||
sensitive (creating directories named Image and image would not be possible in FAT | sensitive (creating directories named Image and image would not be possible in FAT | ||
systems). | systems). | ||
== User cases == | == User cases == | ||
=== User case #1 | === User case #1 === | ||
Jenny is using Octave on the department cluster. She is not the administrator but | Jenny is using Octave on the department cluster. She is not the administrator but | ||
there's already a system-wide installation of Octave with the general and | there's already a system-wide installation of Octave with the general and | ||
Line 243: | Line 173: | ||
on the network that his students could mount whenever they needed it. | on the network that his students could mount whenever they needed it. | ||
=== User case #2 | === User case #2 === | ||
Denise installs Octave 3.4.3 and installs the latest version of the financial (1.0.4) and | Denise installs Octave 3.4.3 and installs the latest version of the financial (1.0.4) and | ||
image (2.0.0) package with "pkg install -forge financial image". After installing the packages, | image (2.0.0) package with "pkg install -forge financial image". After installing the packages, | ||
Line 251: | Line 181: | ||
tests in the package (using the cached package to run the tests in the .cc files). | tests in the package (using the cached package to run the tests in the .cc files). | ||
Later, Denise installs Octave 3.6.2 but keeps the previous version of Octave on the | Later, Denise installs Octave 3.6.2 but keeps the previous version of Octave on the | ||
system since some of her old code no longer runs correctly. Loading the financial | system since some of her old code no longer runs correctly. Loading the financial | ||
Line 266: | Line 196: | ||
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 | are kept altough "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. | ||
=== User case #3 | === User case #3 === | ||
Owen is stuck using the financial package 1.0.4 because some of his code no | Owen is stuck using the financial package 1.0.4 because some of his code no | ||
longer works in the latest versions. However the latest version of financial | longer works in the latest versions. However the latest version of financial | ||
Line 280: | Line 210: | ||
while "pkg load financial" always loads the latest version of the package. | while "pkg load financial" always loads the latest version of the package. | ||
=== User case #4 | === User case #4 === | ||
Lisa is using Octave in a remote machine on the biochemistry department. The | Lisa is using Octave in a remote machine on the biochemistry department. The | ||
system administrator installed Octave 3.6.2, signal package 1.2.0, and | system administrator installed Octave 3.6.2, signal package 1.2.0, and | ||
general 1.0.0. | general 1.0.0. Lisas uses all of them but she also requires the image package. | ||
However, the system administrator does not have time to access security issues | However, the system administrator does not have time to access security issues | ||
with the package and tells her to install that package locally. She runs "pkg | with the package and tells her to install that package locally. She runs "pkg | ||
Line 290: | Line 220: | ||
When Octave 3.6.3 is released, Lisa wants to use the new version since it fixes | When Octave 3.6.3 is released, Lisa wants to use the new version since it fixes | ||
one bug that has been | one bug that has been aanoying her for a long time but the system administrator | ||
does not want to make the update and tells her to build it herself locally | does not want to make the update and tells her to build it herself locally | ||
=== User case #5 | === User case #5 === | ||
Diana is a student that wants to run her code in the departmental cluster. However, | Diana is a student that wants to run her code in the departmental cluster. However, | ||
the system does not have an installation of Octave and she needs to install it on | the system does not have an installation of Octave and she needs to install it on | ||
Line 314: | Line 244: | ||
to her own list of available packages. which she can load. | to her own list of available packages. which she can load. | ||
=== User case #6 | === User case #6 === | ||
John is a professor of biomechanics and uses Octave on his classes. Most of the | John is a professor of biomechanics and uses Octave on his classes. Most of the | ||
exercises he gives to the class require the use of multiple packages in Octave | exercises he gives to the class require the use of multiple packages in Octave | ||
Line 320: | Line 250: | ||
metapackage for his student listing all required packages. The students install | metapackage for his student listing all required packages. The students install | ||
it with "pkg install -url path-to-his-metapackage". The metapackage has no file | it with "pkg install -url path-to-his-metapackage". The metapackage has no file | ||
it simply lists a bunch of package | it simply lists a bunch of package has dependencies. Since pkg solves this | ||
dependencies automatically, a message showing which packages will be installed | dependencies automatically, a message showing which packages will be installed | ||
is displayed before doing it. | is displayed before doing it. | ||
= | === Where to install things === | ||
== 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.) | 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.) | ||