Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,090 of 9,090 pages
About the help in other languages
All help pages

Dependencies and install order

How a site package declares the packages it needs (require type ezpackage with min-version), how the setup wizard and the kickstarter fetch them, how min-version is compared, and the exact order in which packages are…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/site-packages/basics/dependencies-and-install-order.md

On this page

Dependencies and install order

This page is for developers who write the <requires> of a site package, and for administrators who wonder why an install fetched, replaced or refused a package. It answers: how a requirement is written, how it is checked, and in which order packages are fetched and installed.

Contents

  1. How a requirement is written
  2. How min-version is compared
  3. Fetching: what the wizard downloads
  4. Installing: the order on the site
  5. Requirements of requirements
  6. The other dependency sections
  7. Checklist for your own requirements
  8. Related pages

How a requirement is written

<dependencies>
  <requires>
    <require type="ezpackage" name="sevenx_classes" min-version="5.1" />
    <require type="ezpackage" name="sevenx_multisite_democontent" min-version="5.1" />
  </requires>
</dependencies>
AttributeMeaning
typeezpackage for another package. The Create sites step ignores any other type
nameThe <name> of the required package, which is also its file name on the package server
min-versionThe lowest <number>-<release> that satisfies the requirement; without it, any version does

The order of the <require> elements is the order of installation. Put content classes before the content that uses them, as sevenx_multisite does.

How min-version is compared

A package's version is eZPackage::getVersion(): <version><number> and <version><release> joined by -. It is compared with min-version by eZPackageVersion::compareFull() (kernel/classes/ezpackageversion.php):

  • The part after the last - is the release number only when it is all digits; the rest is the version number.
  • Version numbers compare by Semantic Versioning 2.0.0 precedence. Older forms are read too: 1 and 1.0 read as 1.0.0, a fourth part compares after PATCH, 3.4.0beta1 reads as the prerelease beta1.
  • When the version numbers are equal, the release numbers compare as numbers (a missing one counts as 0).
Installedmin-versionResult
6.0-10-stable (sevenx_classes in 6.0.15)5.1satisfied: 6 is greater than 5
1.0-11.0-2not satisfied
1.0-11.0.0-1satisfied: equal

Note

The version attribute of an index.xml entry is not compared with min-version. Only the version inside an imported package counts.

Fetching: what the wizard downloads

eZStepSiteTypes::downloadDependantPackages() (kernel/setup/steps/ezstep_site_types.php) runs after the site package is imported. For every <require> of the site package, in order:

  1. Look for a package of that name in the local repository.
  2. If it exists and compareFull( installed, min-version ) >= 0: keep it, download nothing.
  3. If it exists but is older: remove it from the repository and download the new one.
  4. If it does not exist: download it.
  5. To download, look the name up in the index; the URL is the entry's url. A name the index does not list stops the step with "Download of package '...' failed. You may upload the package manually."

Each download is imported with eZPackage::import() into the repository its vendor names. In a kickstarter dry run everything is downloaded into the temporary repository var/storage/packages/dryrun instead, so the whole chain is checked without touching the real repository.

Installing: the order on the site

The Create sites step (kernel/setup/steps/ezstep_create_sites.php) then:

  1. Fetches the site package; error EZSW-041 when it cannot.
  2. Includes its install scripts and calls eZSitePreInstall() (see Install scripts in a site package).
  3. Walks the site package's <require> list in order. For each type="ezpackage" item:
    • fetches the package; error EZSW-050 "Could not fetch required package" when it is missing;
    • when its install_type is install, installs it; error EZSW-051 "Unable to install package" when that fails;
    • when its install_type is import, leaves it as it is (a site style, for example, whose files the installer scripts use).
  4. Writes the settings, roles and preferences, and calls eZSitePostInstall().

For sevenx_multisite this means: sevenx_classes is installed first, then sevenx_multisite_democontent, then the installer runs.

Requirements of requirements

eZPackage::install() handles requirements too, like a package manager: before it installs a package's own items, it installs every package that package requires, one level after another (eZPackage::installUnaudited(), "apt-like: pre-install all required packages"). A package already being installed higher up the chain is skipped, so a loop does not run for ever. A required package that is not in the repository only logs a warning there.

Note

From 6.0.15 on the setup wizard downloads the whole chain: the site package's requirements, theirs, and so on, each package once (eZStepSiteTypes::downloadDependantPackages()), from any package server it reads. Before, it downloaded only the direct requirements, and a requirement's own requirements had to be in the local repository already, or they were only logged as missing when it was installed. Listing every package a site needs in the site package itself, as every site package of the 6.0.15 index does, still works with older releases.

eZPackage::install() does not check whether a package is installed already: when two requirements require the same package, its items run twice. The kernel only drops repeated items inside one package.

The other dependency sections

<provides>, <obsoletes> and <conflicts> are read and kept, and shown by the package pages and ezpm info, but neither the setup steps nor eZPackage::install() act on them. The 7x design packages declare <provide type="ezfile" name="collection" value="default"/> for information.

Checklist for your own requirements

  • To do: Every package the site needs is listed in the site package itself, with type="ezpackage".
  • To do: Classes come before content, extensions before content that uses their datatypes.
  • To do: Every name is listed in the index.xml the installation reads.
  • To do: min-version is at most the version inside the archive on the server.
  • To do: The required packages that must change the site have install_type="install".

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x