Packages (11403666)
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 (/package/list): every repository of var/storage/packages with its packages.
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
- Package types The package types of Exponential 6: content class, content object, extension, site style and site packages.
- Creating new packages Creating packages with the package wizard: content class, content object, extension and site style packages.
- Exporting packages to files Downloading a package as an .ezpkg file from Setup > Packages or with ezpm.php export.
- Importing packages to the system Importing .ezpkg packages: the upload checks, the size limits in package.ini and importing large packages with ezpm.php.
- Removing packages from repository Removing packages from a repository on Setup > Packages, and why removing is not uninstalling.
- Installing packages Installing packages: compare, the install steps, class and object conflicts, install as drafts and installing in the background.
- Uninstalling packages Uninstalling a package from Setup > Packages.
- package.xml format The package.xml format: main elements, install items and their types, and checking a package with ezpm.php validate.
- Custom install scripts Custom install steps in a package: the ezinstallscript item, its description, template and PHP class for PHP 8.
- change a package / Packages / Features / 6.x / Technical ... Exponential Documentation
- DTD of package.xml / package.xml format / Packages / Feat... Exponential Documentation
Contributors
- Svitlana Shatokhina Commenter
- Geir Arne Waaler
- Harry van Irsel Commenter
- Gaetano Commenter
- Graham Brookins Updated Maintainer
Comments (3 historical)
Written by readers of the earlier documentation sites, kept as they were.
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?
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.
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