[wpkg-users] [Bug 184] Add an inherit attribute to package actions

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Mon Oct 10 02:05:48 CEST 2011


http://bugzilla.wpkg.org/show_bug.cgi?id=184

--- Comment #3 from Rainer Meier <r.meier at wpkg.org>  ---
I have just committed an update which is supposed to include an updated for
this as well. Please verify it using the code from SVN (WPKG 1.2.1-RC21):

<http://wpkg.svn.sourceforge.net/viewvc/wpkg/wpkg/stable/1.2/>

NEW: Commands can now be defined in a more well-grouped format:
     <package id='pidgin' name='Pidgin IM' revision='2.10.0'>
       <check type='uninstall' condition='exists' path='Pidgin' />
       <commands>
         <command type="install" cmd='"%SOFTWARE%\..."' />
         <command type="remove" cmd='"%SOFTWARE%\..."' />
         <command type="upgrade" cmd='"%SOFTWARE%\..."' />
         <command type="downgrade" cmd='"%SOFTWARE%\..."' />
       </commands>
     </package>

     It's also allowed to mix old and new style where old-style commands are
     installed first:

     <package id='pidgin' name='Pidgin IM' revision='2.10.0'>
       <check type='uninstall' condition='exists' path='Pidgin' />
       <install type="install" cmd='"%SOFTWARE%\install1.cmd"' />
       <commands>
         <command type="install" cmd='"%SOFTWARE%\install2.cmd"' />
         <command type="remove" cmd='"%SOFTWARE%\..."' />
         <command type="upgrade" cmd='"%SOFTWARE%\..."' />
         <command type="downgrade" cmd='"%SOFTWARE%\..."' />
       </commands>
     </package>

     Here WPKG would first install "install1.cmd" and then "install2.cmd".
     This is still the case if the commands are re-ordered:

     <package id='pidgin' name='Pidgin IM' revision='2.10.0'>
       <check type='uninstall' condition='exists' path='Pidgin' />
       <commands>
         <command type="install" cmd='"%SOFTWARE%\install2.cmd"' />
         <command type="remove" cmd='"%SOFTWARE%\..."' />
         <command type="upgrade" cmd='"%SOFTWARE%\..."' />
         <command type="downgrade" cmd='"%SOFTWARE%\..."' />
       </commands>
       <install type="install" cmd='"%SOFTWARE%\install1.cmd"' />
     </package>

     Here still "install1.cmd" is launched first and then "install2.cmd".

     This new style of commands also allows you to specify any artificial name
     for type and refer to it in includes.
     For example:

     <package id='pidgin' name='Pidgin IM' revision='2.10.0'>
       <commands>
         <command type="install" include='prepare' />
         <command type="install" cmd='"%SOFTWARE%\install.cmd"' />
         <command type="install" include='cleanup' />

         <command type="remove" include='prepare' />
         <command type="remove" cmd='"%SOFTWARE%\remove.cmd"' />
         <command type="remove" include='cleanup' />

         <command type="upgrade" cmd='"%SOFTWARE%\upgrade.cmd"' />

         <command type="downgrade" cmd='"%SOFTWARE%\downgrade.cmd"' />

         <command type="prepare" cmd='"%SOFTWARE%\prepare1.cmd"' />
         <command type="prepare" cmd='"%SOFTWARE%\prepare2.cmd"' />

         <command type="cleanup" cmd='"%SOFTWARE%\cleanup.cmd"' />
       </commands>
       <install type="install" cmd='"%SOFTWARE%\install1.cmd"' />
     </package>

     In this example WPKG would launch the following commands during
     installation;
     - prepare1.cmd
     - prepare2.cmd
     - install.cmd
     - cleanup.cmd
     During remove the following commands would be run:
     - prepare1.cmd
     - prepare2.cmd
     - remove.cmd
     - cleanup.cmd

     NOTE: WPKG will not run any of the "prepare" or "cleanup" commands
     automatically if not included by command types known to WPKG (install,
     remove, upgrade or downgrade at time of writing).

     This is supposed to implement as well a request by Peter Hoeg
     submitted in Bug 184.

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the wpkg-users mailing list