The local package repository
This page is for administrators and hosting teams who look into var/storage/packages/, copy packages between
servers, or prepare an installation without network access. It answers: where packages are kept, how the
directories are named, what each one is for, and what you may touch.
Contents
- Where it is
- The layout
- How a vendor directory is chosen
- The local repository and the system repository
- The .cache directory
- An offline index.xml
- What you may do by hand
- Related pages
Where it is
eZPackage::repositoryPath() builds the path from three parts:
var / site.ini [FileSettings] StorageDir / package.ini [RepositorySettings] RepositoryDirectory
var / storage / packagesThe first part is the literal var; the repository does not move with [FileSettings] VarDir. As shipped
(StorageDir=storage, RepositoryDirectory=packages) it is var/storage/packages/ below the installation root, for
every siteaccess. A new installation may not have the directory yet; the kernel then lists no repository besides
local.
The layout
var/storage/packages/
├── 7x/ vendor "7x": the setup wizard's system repository
│ ├── index.xml optional: the offline index (see below)
│ ├── sevenx_multisite/
│ │ ├── package.xml
│ │ ├── .cache/package.php the kernel's parsed copy, not part of the package
│ │ ├── documents/ files/ settings/
│ ├── sevenx_classes/
│ └── sevenx_multisite_democontent/
├── ez-systems/ vendor "eZ systems"
│ └── ezstarrating_extension/
├── local/ packages without a vendor, and new packages from the wizards
└── dryrun/ only during a kickstarter dry run, removed afterwardsEvery directory directly below var/storage/packages/ is a repository; every directory in a repository that holds
a package.xml or package.json is a package (eZPackage::packageRepositories(), fetchPackages()). Its
directory name is the package's <name>. On a fresh sevenx_multisite installation the 7x repository holds
sevenx_multisite, sevenx_classes and sevenx_multisite_democontent.
How a vendor directory is chosen
| Package | Repository |
|---|---|
Imported, with a <vendor> | the vendor run through the urlalias transformation: 7x stays 7x, eZ systems becomes ez-systems |
Imported, without a <vendor> | local |
Imported with an explicit repository (ezpm import with -r, a kickstarter dry run) | that repository |
Created by a wizard or ezpm create | local (eZPackage::create(): "New packages always use local repository") |
Two packages of the same name in two repositories can exist; eZPackage::fetch( $name ) without a repository returns
the first it finds, local first. Keep names unique across repositories.
The local repository and the system repository
| Name | What it is | Type in the code |
|---|---|---|
local | Always the first repository, created on demand; new packages go here | local |
| every other directory | One repository per vendor | global |
| the system repository | The repository named by [RepositorySettings] Vendor (7x): where the setup wizard looks for an offline index.xml | eZPackage::systemRepositoryInformation() |
The administration's package list shows the repositories and lets you switch between them; see The package list and package page.
The .cache directory
When the kernel reads a package, it writes the parsed definition to <package>/.cache/package.php and uses that copy
as long as it is not older than package.xml and was written by the same code version (CACHE_CODE_DATE). It is a
cache: deleting it is harmless, and it is never exported or archived (exportToArchive() copies only documents,
files, simplefiles, settings and the item directories). When you edit a package.xml in place, its newer time
stamp makes the kernel read it again.
An offline index.xml
When the setup wizard or the kickstarter cannot download <RemotePackagesIndexURL>/index.xml, it copies
var/storage/packages/<Vendor>/index.xml (with Vendor=7x: var/storage/packages/7x/index.xml) and uses it instead
(eZStepSiteTypes::retrieveRemotePackagesList()). Combined with packages that are already imported, this allows an
install without network access:
# on a machine with access, from the installation root
curl -s -o var/storage/packages/7x/index.xml \
https://exponential.packages.exponential.earth/exponential/6.0/6.0.15/index.xml
php ezpm.php import sevenx_multisite.ezpkg
php ezpm.php import sevenx_classes.ezpkg
php ezpm.php import sevenx_multisite_democontent.ezpkgThe url attributes in that index still point to the server, so every package a run needs must already be imported.
The full procedure, including mirrors, is in
Offline installs and mirrors.
What you may do by hand
| Action | Safe? | Notes |
|---|---|---|
| Copy a package directory into a repository | yes | Same as an import, without the archive checks; keep the directory name equal to <name> |
Delete a .cache/ directory | yes | It is written again |
| Delete a package directory | yes for the repository | Prefer Remove in Setup > Packages or ezpm delete: they also clear the installed record. What an install put on the site stays either way |
Edit package.xml in place | with care | A broken definition hides the package. Make lasting changes in the package's source repository |
| Put a package in a directory that is not a repository | no | It is not found |
| Add symbolic links inside a package | no | The removal confirmation refuses a package whose directory contains a link |
Tip
var/storage/packages/ belongs in your backups when you install offline or keep packages of your own there. The
packages of the package server can be downloaded again at any time.
Related pages
- Site package basics
- Site packages: start here
- Packages guide, 1. Where packages live
- Import versus install
- How the kickstarter and the console use packages
- Package server settings
- Contribute your site package
- 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.