close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Version 6 and Version 7 of TolPackage


Ignore:
Timestamp:
Feb 8, 2016, 10:46:25 AM (9 years ago)
Author:
Pedro Gea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TolPackage

    v6 v7  
    2121!TolPackage is a TOL '''module''' (part of TolCore) for the TOL-packages management: installation, updating and upgrading, loading, creation, etc.
    2222
     23== Functionalities ==
     24
     25!TolPackage has different versions linked to the package design evolution and requirements (see [wiki:TolPackage#History History]).
     26
     27The main functionalities described below are available from !TolPackage version 2 onwards.
     28
     29=== Package installation ===
     30
     31A package is automatically installed the first time it is required ({{{#Require}}}).
     32
     33{{{
     34#!cpp
     35#Require <package>;
     36}}}
     37
     38However, an installation can be carried out manually via the {{{InstallPackage}}} function, indicating the
     39identifier (name and version) of the package desired for installation:
     40
     41{{{
     42#!cpp
     43Real TolPackage:InstallPackage(<packageIdentifier>);
     44}}}
     45
     46If you don't know the most recent version we can use the {{{InstallLastCompatible}}} function
     47and simply indicate the package name:
     48
     49{{{
     50#!cpp
     51Real TolPackage:InstallLastCompatible(<packageName>);
     52}}}
     53
     54=== Update and upgrade ===
     55
     56Periodically, new versions of a package are created. So, you need update and upgrade your packages to stay up to date.
     57
     58!TolPackage identifies two replacement mechanisms:
     59
     60 * A package update, consisting of the substitution of the package for another more recent one, which has the same version numbers.
     61
     62 * A package upgrade, consisting of the installation of a new version of the package.
     63   Note that the previous version is not uninstalled.
     64
     65A package update usually includes important corrections, since the reconstruction of a
     66package with the same version discards the previous one.
     67
     68To update a package we can use the {{{Update}}} function, indicating the package name:
     69{{{
     70#!cpp
     71Real TolPackage::Update(<packageName>);
     72}}}
     73
     74We can also update all the packages we have installed using the {{{UpdateAll}}} function:
     75{{{
     76#!cpp
     77Real TolPackage::UpdateAll(?);
     78}}}
     79
     80A package upgrade is equally recommendable, as in many cases they include important advances
     81in the implemented procedures and algorithms.
     82
     83To improve a unique package we can use the Upgrade function:
     84{{{
     85#!cpp
     86Real TolPackage::Upgrade(<packageName>);
     87}}}
     88
     89And in a similar way, the {{{UpgradeAll}}} function, to improve all of the installed packages:
     90{{{
     91#!cpp
     92Real TolPackage::UpgradeAll(?);
     93}}}
     94
     95=== Low version upgrade ===
     96
     97In case of you wish to upgrade the low-version (second version number) of a package maintaining the high-version as it is, you have {{{the LowUpgrade}}} function. It is called using the package name and the first version number (high-version number):
     98{{{
     99#!cpp
     100Real TolPackage::LowUpgrade(<packageName.highVersion>);
     101}}}
     102
     103Bear in mind that if you do not indicate a high-version when use {{{LowUpgrade}}}, an attempt would be made to upgrade
     104the low-version of all of the installed high-versions.
     105
     106If you wish to obtain all of the upgrades for a package, you have the function {{{FullUpgrade}}} which joins calls to {{{Upgrade}}} and {{{LowUpgrade}}}:
     107{{{
     108#!cpp
     109Real TolPackage::FullUpgrade(<packageName>);
     110}}}
     111
     112You also have functions for low- or full-upgrade all installed packages: {{{LowUpgradeAll}}} and {{{FullUpgradeAll}}}.
    23113
    24114== History ==