Skip to the content
Documentation

Packages (11403666)

No ratings yet

A package is a directory with a package.xml and the files it names: content classes, content objects, extensions, settings, design files, images and documents. Packages carry content and configuration from one installation to another, and the setup wizard builds new sites from them. A package is installed (its items are created on the site), imported (kept in a repository) or exported (written as one .ezpkg file, a gzip compressed tar archive).

Packages are managed under Setup > Packages (/package/list) and with ezpm.php on the command line.

Setup > Packages: figures, repositories and the package search

Setup > Packages (/package/list): every repository of var/storage/packages with its packages.

Screenshot of the Exponential 6.0.15 administration (admin4), light mode, 1440 pixels

Operations

Operation What it does Page
Create Writes a new package of classes, content, an extension or a site style into the local repository Creating new packages
Import Uploads an .ezpkg file, checks it and unpacks it into a repository Importing packages
Install Creates the package's classes and objects, writes its settings and files Installing packages
Uninstall Removes from the site what the package installed Uninstalling packages
Download (export to file) Sends the package as an .ezpkg file Exporting packages to files
Remove Deletes the package's directory from the repository; it does not uninstall it Removing packages

Repositories

Packages are kept in var/storage/packages/ (site.ini [FileSettings] StorageDir and package.ini [RepositorySettings] RepositoryDirectory). Each directory below it is a repository: local for packages made or imported here without a vendor, and one directory per vendor (7x, the setup wizard's repository, ez-systems, ...). An uploaded package goes to the repository its <vendor> names.

# settings/override/package.ini.append.php
[RepositorySettings]
# a directory below var/storage instead of packages
RepositoryDirectory=importedpackages

A package the setup wizard takes as a source (in its repository, a site package, or required by one) is marked Installer source on the list, and removing it needs an extra confirmation.

The remote repository

The setup wizard downloads site packages and the packages they require from the package server named in package.ini [RepositorySettings] RemotePackagesIndexURL; for 6.0.15 that is the address /exponential/6.0/6.0.15 on the host exponential.packages.exponential.earth. When it is empty, the address is built from RemotePackagesIndexURLBase and the version of the installation. AdditionalRemotePackagesIndexURLs[] adds further servers. The administration interface itself does not download from the remote repository: download the .ezpkg and import it.

Permissions

The package module has the policy functions list, read, create, edit, remove, install, import, export and export_extension; all but the last can be limited by package type. Every form carries the form token. See the policies of the package module.

On the command line

php ezpm.php list                                 # the packages of the repositories
php ezpm.php export sevenx_classes -d var/tmp     # write an .ezpkg
php ezpm.php import var/tmp/mypackage.ezpkg       # the same checks as the upload page
php ezpm.php help                                 # every command

./console ezpm runs the same script. See ezpm: the package manager on the command line.

More

In this section

Contributors

Comments (3 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. change a package

    Harry van Irsel ·

    I have created a package. How can I change this package? How can I add or remove some files to/from an existing package?

    1. Re: change a package

      re: change a package ·

      You can't, you need to import it somewhere and do the changes on that installation and then export it when you are done.

  2. ezpm.php script

    Gaetano ·

    For package operations that take too long and result in a web page timeout, use the ezpm.php command line script, available in the root dir of Exponential

Comments

Add a comment

Comments are read by a moderator before they appear.