Forums / Setup & design / Package manager

Package manager

Author Message

Paul Borgermans

Thursday 13 November 2003 7:58:12 am

Hello

Anyone tried to create their own packages with the package manager? Or even succeeded basic class export/import?

Tried really a lot of things, but it seems we still have to resort on manual class creation over and over again without the docs promised for a few months ago.

A raw example could help a lot to get started, since the help inside the package manager scripts offers hardly any clues beyond the basic commands.

eg, what to use for:

./ezpm.php create PACKAGE
./ezpm.php export TYPE [paramateres]

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Paul Forsyth

Monday 24 November 2003 7:06:48 am

Will there be documentation on how to use the package manager sometime soon?

Had a quick at the latest ezpm.php file but i still see the 'help' as this for exporting:

usage: export TYPE [PARAMETERS]... [TYPE [PARAMETERS]...]...

Which type and parameters should we enter?

paul

Bård Farstad

Monday 24 November 2003 7:12:28 am

We're making GUI versions of the package manager. It's to hard to use the commandline version. 3.3 will have support for content class packages and style packages. This can be made via the admin/setup interface. It's in svn ( but we haven't committed the packages yet so it may be hard to use right now ).

--bård

Documentation: http://ez.no/doc

Paul Forsyth

Monday 24 November 2003 8:13:57 am

Ah, i see the files now, in kernel/package. Looking forward to trying it out when the beta is ready.

paul

Tony Wood

Tuesday 25 November 2003 6:37:32 am

Will this be the default way to install/re-use extensions?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kim Marshall

Friday 16 July 2004 12:34:42 am

I have tried the following:

<b>Create a new package</b>

create PACKAGENAME SUMMARY
eg.
$php -C ezpm.php create staff "all the staff members"
Created package staff-1.0 all the staff members

<b>Show Information for package</b>

info PACKAGENAME
eg.
$ php -C ezpm.php info staff                          
Name        : staff                         Vendor  : 
Version     : 1.0                           Source  : 
Release     : 1                             Licence : GPL
Summary     : all the staff members         State   : alpha
eZ publish  : 3.4 (3.4.1)
Description : 

<b>List all packages</b>
Includes all reporitories

list
eg.
$ php -C ezpm.php list  
The following packages are in the repository:
...
....
....

<b>Editing Package information</b>

set PACKAGE ATTRIBUTE ATTRIBUTEVALUE 
eg. 
$ php -C ezpm.php set staff vendor "Kim Marshall"
Attribute vendor was set to Kim Marshall

<b>Adding classes, templates and objects to the package</b>

add PACKAGENAME contentobject [options] [path|node] 

where options are:
--include-classes
Include class definitions in package (default)
--include-templates
Include related template files in package (default)
--exclude-classes
Do not include class definitions in package
--exclude-templates
Do not include related template files in package
--language
Comma separated list of languages to export.
If not supplied the value is taken from settings.
--current-version
Export only the published version for all objects. (default)
--all-versions
Export all versions for all objects.
--node-main
Export only main node for all objects. (default)
--node-selected
Export all nodes for all objects.
--siteaccess
Comma separated list of siteaccess to get definitions from, determines template override data and designs.
If not supplied the value is taken from default siteaccess.

and path:
The path is chosen in the same manner as the URL alias which is shown in the path in the browser. If you want to export all objects under the node you must add /* to the end of the path
e.g. news/this_is_news ,news or news/*
Note: To fetch the entire tree including users and media you must use an empty string, e.g. ''

$ php -C ezpm.php add staff contentobject --exclude-templates --exclude-classes "home/about_us/staff/*"
Adding node /home/about_us/staff to package

$ php -C ezpm.php add staff contentobject --exclude-templates --exclude-classes "home/about_us/elected_members/*"
Adding node /home/about_us/elected_members to package

$ php -C ezpm.php add staff contentobject "home/links/*"Adding node /home/links to package

Now it makes no sense to install this package on the site where it was created sicne all the classes, templates and objects allready exist there. But I tried it anyway.

$ php -C ezpm.php install staff-1.0-1.ezpkg 
Failed importing package staff-1.0-1.ezpkg

And it failed.

So then I tried installing a package from the "All" repository

$php -C ezpm.php install t13-3.4.1-1
Could not open package t13-3.4.1-1, none of these files were found: t13-3.4.1-1,t13-3.4.1-1.ezpkg

And it failed.

I haven't been able to work out the syntax for the export and import commands.
import: Import an eZ publish package.
usage: import PACKAGE

export: Export a part of the eZ publish installation into a package.
usage: export TYPE [PARAMETERS]... [TYPE [PARAMETERS]...]...
Options:
-o,--output FILE export to file

But I did try

$php -C ezpm.php export staff

the command hung but did create a file staff-1.0.1.ezpkg

Anyway, I gave up on import and export and just did this via the browser. Then tried to install the package on the site that I had just imported it to. However the package could not be found even though the list command showed it to be there.

$php -C ezpm.php install staff-1.0-1
Could not open package staff-1.0-1, none of these files were found: staff-1.0-1,staff-1.0-1.ezpkg

$ php -C ezpm.php list               
The following packages are in the repository:
staff-1.0-1 (all the staff members)
....

So I gave up trying to do it all in command line (which I REALLY, REALLY want to do) and tried to do it all via the browser and got.

Fatal error:  Call to a member function on a non-object in /home/ezpublish/sites/coomalie/kernel/classes/datatypes/ezurl/ezurltype.php on line 268
Fatal error: eZ publish did not finish it's request

The execution of eZ publish was abruptly ended, the debug output is present below.

I did manage to install one of the packages provided with eZpublish 3.4.0 on another more complex site and was surprised to see that when I uninstalled it the template files remained and took priority over those that we had defined. They also could not be deleted via the admin interface.

I'd love to know if anyone has done this sucessfully.