How the setup wizard uses packages
This page is for administrators who run the web setup wizard and for developers who need to know what it does with packages behind the screens. It answers: where the list of site packages comes from, what is downloaded and when, where it goes, and how the chosen package becomes a site. The screens themselves, with every message, are described in The setup wizard; this page follows the packages.
Contents
- The steps that touch packages
- Site types: building the list
- Site types: choosing a package
- Site types: uploading a package
- Package language options
- Create sites
- Where the files go
- When something fails
- Related pages
The steps that touch packages
The wizard's steps are listed in kernel/setup/steps/ezstep_data.php (StepTable). Three of them work with
packages:
| Step | Class and file | What it does with packages |
|---|---|---|
| Site types ("Site package" on screen) | eZStepSiteTypes, ezstep_site_types.php | Reads the index, lists the site packages, downloads and imports the chosen one and its requirements |
| Package language options | eZStepPackageLanguageOptions, ezstep_package_language_options.php | Compares the languages of the required packages with the site's languages |
| Create sites | eZStepCreateSites, ezstep_create_sites.php | Runs the install scripts and installs the required packages |
Note
There is a fourth step class for packages, eZStepSitePackages (ezstep_site_packages.php, "Site
functionality", choosing additional packages), but its entry in StepTable is commented out: the wizard never
shows it, and its kickstart.ini keys have no effect. It stays off on purpose (checked for 6.0.15): it offers the
packages of the 3.x "addons" repository by the lists of eZSetupFunctionality(), a function that no longer
exists, so the step would stop with a fatal error, and no package of the index is an addon. What it was for is
covered otherwise: a site package's requirements, down the whole chain, are downloaded by Site types and
installed by Create sites.
Site types: building the list
When the step is built, it works out the index address from settings/package.ini:
[RepositorySettings]
RemotePackagesIndexURL=https://exponential.packages.exponential.earth/exponential/6.0/6.0.15
RemotePackagesIndexURLBase=https://exponential.packages.exponential.earth/exponentialRemotePackagesIndexURL is used when it is not empty; otherwise the base plus /<major.minor>/<full version>/. The
step appends index.xml. Then, on every display:
- Remote list. Download
index.xmlinto the cache directory'spackages/folder (with the retries ofDownloadAttemptsandDownloadRetryDelays[], see Package server settings), parse it, delete the copy, and keep the entries whosetypeissite. If the download fails, useindex.xmlfrom the system repository (var/storage/packages/<Vendor>/index.xml,Vendor=7x) when there is one. From 6.0.15 on the index of every further package server follows, adding the packages the earlier ones do not list (Further package servers). - Local list. Every package of type
sitealready in the local repository, in any vendor directory. - Status of requirements. For each local site package, each
<require>is marked imported when a package of that name exists with a version that meets itsmin-version. - Merge. One entry per name. A local package wins, unless the remote entry's
versioncompares higher (eZPackageVersion::compareFull()). An entry without a download URL counts as imported. - Preselect the first imported site package, so Next installs it without a download.
The page also shows the index address ("Remote repository URL") so you can see which server is used.
Site types: choosing a package
The radio button posts eZSetup_site_type: the plain name for an imported package, name|url for a remote one.
On Next (eZStepSiteTypes::processPostData()):
| Choice | What happens |
|---|---|
| A remote entry | downloadAndImportPackage() in force mode: an imported copy of the same name is removed from the repository first, then the archive is downloaded, imported with eZPackage::import(), and the downloaded file is deleted |
| An imported entry | The package is fetched from the repository; nothing is downloaded |
Then, in both cases, downloadDependantPackages() checks every <require> of the site package: kept when imported
and new enough, otherwise removed and downloaded again from the URL the index gives. The rules are in
Dependencies and install order. Only after all requirements are in does the
wizard go on.
Site types: uploading a package
The Upload package field (PackageBinaryFile, button UploadPackageButton) imports an .ezpkg from your
computer with eZPackage::import() and shows the same page again, now with the package in the local list. This is
how you install a site package that is not on the package server, or install without network access. A package that
is already imported is not imported again (a warning is logged); anything that is not a package gives "Uploaded file
is not an Exponential package". The archive is checked as described in The .ezpkg file.
Package language options
The step reads the languages of the content classes and objects in the packages the site package requires
(eZPackage::languageInfoFromPackageList()) and compares them with the languages you chose. Only when packages
carry other languages does it ask what to do with them (create, map to a site language, or skip). The answer is
kept as the language_map that the Create sites step passes to each package's install.
Create sites
The step that writes the site. For packages it:
- Fetches the chosen site package from the repository (
EZSW-041"Could not fetch site package" when it cannot). - Includes the site package's install scripts and calls
eZSitePreInstall()(Install scripts in a site package). - Logs in the administrator (user 14), so the content is created by that user.
- For every
<require type="ezpackage">of the site package, in order: fetches it (EZSW-050when missing) and, when itsinstall_typeisinstall, installs it non-interactively with the site's siteaccess, design, top node 2 and language map (EZSW-051when it fails). - Builds the settings and roles with the INI, role and preference hooks, and calls
eZSitePostInstall().
The site package itself is never installed: it is install_type="import" and has no items.
Where the files go
| What | Where |
|---|---|
The downloaded index.xml and .ezpkg files, while they are used | the cache directory, packages/ (deleted after use) |
| The extracted definition during import | the cache directory, packages/import/ (deleted after use) |
| Every imported package | var/storage/packages/<vendor directory>/<name>/ |
| What the packages install | the database, extension/, design/, settings/, as each handler does |
| The record that a package is installed | the ezpackage table |
When something fails
| Symptom | Likely cause | Read |
|---|---|---|
| "Retrieving remote site packages list failed" | No connection to the package server and no local index.xml | When the package server cannot be reached |
| "Download of package ... failed after N attempts" | The server or a proxy answered with errors | same, and Offline installs and mirrors |
| "Download of package ... failed. You may upload the package manually." for a requirement | The index does not list the required name | The index.xml format |
EZSW-050 | A required package is not in the repository | The local package repository |
EZSW-051 | An install item of a required package failed | the setup log, var/log/setup.log, and Install items and handlers |
EZSW-080 | The site package's post-install stopped | Install scripts in a site package |
Related pages
- Site package basics
- Site packages: start here
- The setup wizard, 5.3.8 Site package
- How the kickstarter and the console use packages
- Downloading a package by hand
- Contribute your site package: a package accepted on the shared server appears in every wizard's list.
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.