Packaging Environment

PackMan 0.9.2 adds support for a new Environment field.

The new Environment field added to the packages allows Package maintainers to specify the features of a RISC OS machine that are required for the package to run successfully.

It also allows multiple versions of a package to be created which are optimized for different environments.

All packages should now include the Environment field as it will allow PackMan to hide packages that will not work in a particular environment.

To ensure the package manager understands this field the Standards-Version field should be at least 0.6.0.

Full details of the Environment field are in the policy manual. The following is a rough guide to the most common settings.

any This package should run on all current (and hopefully future) machines. Typical packages that would use this are:

    • documents that expect RISC OS to have a viewer (e.g. Text, Draw files, PDFs and HTML pages).

    • BASIC programs that do not use machine specific SWI calls or embedded assembler.

    • Script languages or other interpreted language code where an interpreter should be available to run on all RISC OS Machines.

arm This package should run on all machines from RISC OS 4 onwards. Compiled programs using the latest Norcroft or GCC compilers fit into this group as does assembler code that does not use the SWP instruction. The code in these packages should be 26/32 bit neutral, but may need the 32 SharedCLibrary installed.

arm, swp This package will run on 26/32 bit machines that implement the SWP instructions. Programs compiled with older versions of GCC will fit into this category. These programs will not run on the Raspberry Pi version 3 for instance.

vfp This package requires the Vector Floating point hardware. This is available on modern hardware later than the Iyonix.

If a package will automatically adjust itself to machine specific hardware/software, but can run on older systems as well. The environment should be set for the lowest specification it can run on.

Two more fields, OSDepends and InstallPriority can also affect the selection of packages.

PackMan chooses the package to install by picking the highest version available for an environment. When multiple packages match the environment the InstallPriority (or a default priority if none is specified) is used to choose the “best”.

The current version of PackMan does not check the environment of dependencies so must have the most restrictive Environment applied to the main package by hand.

New environments

The number of environment settings is deliberately being kept low and as general as possible. The idea is to check for features of the machine or version of RISC OS rather than a specific machine or OS version,

Please contact me via the email address in the PackMan help file if additional environments are required. I will need to know how the particular feature can be checked and why it is needed.