Distribution

The Distribution field defines the name of the distribution this package is a part of. In most cases, the Distribution field is one name such as stable or unstable. wpkg actually supports distributions defined as a path (i.e. m2osw/stable and m2osw/unstable are perfectly valid.)

It is used by the --build command when the --output-repository-dir option is also specified to determine the location where binary packages are to be saved. In case of a source package, though, the name sources is always used as the distribution name for two reasons: sources are often distribution agnostic and a source package may include multiple distribution paths. The rest of the path determining the location of the binary package in your repository is defined by the Component field:

<output repository dir>/sources/<component>          Source Package
<output repository dir>/<distribution>/<component>   Binary Package

The distribution also appears in your sources.list files: see the --update and --upgrade commands for additional details.

The control file parser accepts distribution paths that start with a slash although it never considers a distribution path as an absolute path.

For packages going inside the wpkg environment, actually called usys, we have a proposed distribution layout.

Distribution Constraint

When setting up a target system, you create a small control file with a few fields such as the Architecture and Maintainer.

The Distribution field is one of the fields supported in that control file (once installed, found under <admindir>/core/control). When a target has a Distribution field defined, it is enforced meaning that only packages that have that field set with the same value are considered to be valid for installation on that target system.

Note that no distribution in the core control file means "any". However, no distribution information in a package control file is not considered as "can be installed on any target".

It is possible to bypass the Distribution validation test with the --force-distribution option.

Distribution Example

Say we are creating the base wpkg.exe package control file, we want to place that in the distribution stable and as the component core/install:

File: wpkg/control.info (project being built)

Distribution: stable
Component: core/install

The corresponding sources.list file should have an entry like this:

File: sources.list (target)

wpkg http://wpkg.m2osw.com/ stable/core install

This way the build operations can automatically save, for example, the wpkg_0.8.0_linux-amd64.deb file in the directory so one can download it via a URI such as:

wget http://wpkg.m2osw.com/stable/core/install/wpkg_0.8.0_linux-a...

And of course such packages can be installed automatically with a wpkg --install command as follow:

wpkg --install http://wpkg.m2osw.com/stable/core/install/wpkg_0.8.0_linux-a...

Note that at this time only HTTP and SMB/SMBS work for remote downloads directly from wpkg.




  
    
Syndicate content