Octave Forge 4.0.3



Where name, arg-list, and body have the same meaning as before, and ret-list is a comma-separated list of variable names that will hold the values returned from the function. The list of return values must have at least one element. If ret-list has only one element, this form of the function statement is equivalent to the form described in the previous section. The ideal outcome would be if the files were rewritten to conform to Octave's coding style and use STL and Octave library functions where appropriate:) The same applies to ultrwin really, I would like to see that use Octave's coding style and library functions as well if possible.

Next: Using Packages, Up: Packages [Contents][Index]

38.1 Installing and Removing Packages

Forge

Assuming a package is available in the file image-1.0.0.tar.gzit can be installed from the Octave prompt with the command

If the package is installed successfully nothing will be printed onthe prompt, but if an error occurred during installation it will bereported. It is possible to install several packages at once bywriting several package files after the pkg install command.If a different version of the package is already installed it willbe removed prior to installing the new package. This makes it easy toupgrade and downgrade the version of a package, but makes itimpossible to have several versions of the same package installed atonce.

To see which packages are installed type

In this case only version 1.0.0 of the image package isinstalled. The '*' character next to the package name shows that theimage package is loaded and ready for use.

It is possible to remove a package from the system using thepkg uninstall command like this

If the package is removed successfully nothing will be printed in theprompt, but if an error occurred it will be reported. It should benoted that the package file used for installation is not needed forremoval, and that only the package name as reported by pkg listshould be used when removing a package. It is possible to removeseveral packages at once by writing several package names after thepkg uninstall command.

To minimize the amount of code duplication between packages it ispossible that one package depends on another one. If a packagedepends on another, it will check if that package is installedduring installation. If it is not, an error will be reported andthe package will not be installed. This behavior can be disabledby passing the -nodeps flag to the pkg installcommand

Since the installed package expects its dependencies to be installedit may not function correctly. Because of this it is not recommendedto disable dependency checking.

Command: pkgcommandpkg_name
Command: pkgcommandoptionpkg_name

Manage packages (groups of add-on functions) for Octave.

Different actions are available depending on the value of command.

Available commands:

install

Install named packages. For example,

installs the package found in the file image-1.0.0.tar.gz.

The option variable can contain options that affect the mannerin which a package is installed. These options can be one or more of

-nodeps

The package manager will disable dependency checking. With this option itis possible to install a package even when it depends on another packagewhich is not installed on the system. Use this option with care.

-noauto

The package manager will not automatically load the installed packagewhen starting Octave. This overrides any setting within the package.

-auto

The package manager will automatically load the installed package whenstarting Octave. This overrides any setting within the package.

-local

A local installation (package available only to current user) is forced,even if the user has system privileges.

-global

A global installation (package available to all users) is forced, even ifthe user doesn’t normally have system privileges.

-forge

Install a package directly from the Octave-Forge repository. Thisrequires an internet connection and the cURL library.

-verbose

The package manager will print the output of all commands asthey are performed.

update

Octave Forge 4.0.3 Pro

Check installed Octave-Forge packages against repository and update anyoutdated items. This requires an internet connection and the cURL library.Usage:

uninstall

Uninstall named packages. For example,

removes the image package from the system. If another installedpackage depends on the image package an error will be issued.The package can be uninstalled anyway by using the -nodeps option.

load

Add named packages to the path. After loading a package it ispossible to use the functions provided by the package. For example,

adds the image package to the path. It is possible to load allinstalled packages at once with the keyword ‘all’. Usage:

unload

Remove named packages from the path. After unloading a package it isno longer possible to use the functions provided by the package. It ispossible to unload all installed packages at once with the keyword‘all’. Usage:

list

Show the list of currently installed packages. For example,

will produce a short report with the package name, version, and installationdirectory for each installed package. Supply a package name to limitreporting to a particular package. For example:

If a single return argument is requested then pkg returns a cellarray where each element is a structure with information on a singlepackage.

If two output arguments are requested pkg splits the list ofinstalled packages into those which were installed by the current user,and those which were installed by the system administrator.

The '-forge' option lists packages available at the Octave-Forgerepository. This requires an internet connection and the cURL library.For example:

4.0.3
describe

Show a short description of the named installed packages, with the option'-verbose' also list functions provided by the package. For example,

Octave

will describe all installed packages and the functions they provide.If one output is requested a cell of structure containing thedescription and list of functions of each package is returned asoutput rather than printed on screen:

If any of the requested packages is not installed, pkg returns anerror, unless a second output is requested:

flag will take one of the values 'Not installed','Loaded', or'Not loaded' for each of the named packages.

Octave Forge 4.0.3
prefix

Set the installation prefix directory. For example,

Octave Forge 4.0.3 Mac

sets the installation prefix to ~/my_octave_packages.Packages will be installed in this directory.

It is possible to get the current installation prefix by requesting anoutput argument. For example:

The location in which to install the architecture dependent files can beindependently specified with an addition argument. For example:

local_list

Set the file in which to look for information on locallyinstalled packages. Locally installed packages are those that areavailable only to the current user. For example:

It is possible to get the current value of local_list with the following

global_list

Set the file in which to look for information on globallyinstalled packages. Globally installed packages are those that areavailable to all users. For example:

It is possible to get the current value of global_list with the following

build

Build a binary form of a package or packages. The binary file producedwill itself be an Octave package that can be installed normally withpkg. The form of the command to build a binary package is

where builddir is the name of a directory where the temporaryinstallation will be produced and the binary packages will be found.The options -verbose and -nodeps are respected, whileall other options are ignored.

rebuild

Rebuild the package database from the installed directories. This canbe used in cases where the package database has been corrupted.It can also take the -auto and -noauto options to allow theautoloading state of a package to be changed. For example,

will remove the autoloading status of the image package.

See also:ver, news.

Free

Octave Forge 4.0.3 Free

Next: Using Packages, Up: Packages [Contents][Index]