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.

eZ debug

Timing: Jan 18 2025 14:56:29
Script start
Timing: Jan 18 2025 14:56:29
Module start 'content'
Timing: Jan 18 2025 14:56:30
Module end 'content'
Timing: Jan 18 2025 14:56:30
Script end

Main resources:

Total runtime1.4239 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 588.7188180.8516
Module start 'content' 0.00801.1692 769.5703730.8516
Module end 'content' 1.17720.2466 1,500.4219341.0938
Script end 1.4238  1,841.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2972210.0002
Check MTime0.00160.1111210.0001
Mysql Total
Database connection0.00090.061010.0009
Mysqli_queries1.318892.61992090.0063
Looping result0.00380.26912070.0000
Template Total1.386797.420.6933
Template load0.00200.139220.0010
Template processing1.384797.244920.6923
Template load and register function0.00010.006810.0001
states
state_id_array0.00150.108610.0015
state_identifier_array0.00370.257020.0018
Override
Cache load0.00180.1277910.0000
Sytem overhead
Fetch class attribute can translate value0.00230.159360.0004
Fetch class attribute name0.00110.079390.0001
XML
Image XML parsing0.00200.138560.0003
class_abstraction
Instantiating content class attribute0.00000.001090.0000
General
dbfile0.00760.5334410.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
21content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 49
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs