[wpkg-users] Check for action WPKG is doing on a package

Stefan Pendl stefan.pendl.71 at gmail.com
Fri Jan 13 13:59:21 CET 2012


Am 13.01.2012 13:39, schrieb Malte Hohmann:
> Hi there,
>
> I really love the possibility of inclusion and conditional execution of commands. This allows much more flexibility in the development of packages. However, I am missing the possibility to check what action WPKG is performing on a package.
>

One way would be to define a custom command type and include that where 
appropriate.

<!-- code start (watch for line wraps) -->

<command type="shared" .../>

<install include="shared"/>
<install include="upgrade"/>

<upgrade cmd=... />
<upgrade ... />
<upgrade ... />
<upgrade ... />

<remove include="shared"/>
<remove ... />

<!-- code end -->

----

Another way is to let install include the upgrade commands, but add one 
of its own commands.

<!-- code start (watch for line wraps) -->

<install cmd=.../>
<install include="upgrade"/>

<upgrade cmd=.../>
<upgrade ...
<upgrade ...
<upgrade ...

<!-- code end -->

----

If the extra command is in between of the upgrade command sequence, you 
could split the command sequence using custom command types too.

<!-- code start (watch for line wraps) -->

<command type="upgrade_part_1" .../>
<command type="upgrade_part_1" .../>
<command type="upgrade_part_1" .../>

<command type="upgrade_part_2" .../>
<command type="upgrade_part_2" .../>
<command type="upgrade_part_2" .../>

<install include="upgrade_part_1"/>
<install cmd=... />
<install include="upgrade_part_2"/>

<upgrade include="upgrade_part_1"/>
<upgrade include="upgrade_part_2"/>

<!-- code end -->

This is not tested, but you should get the idea.
I would not mix new and old syntax, but it was shorter to post ;-)


--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



More information about the wpkg-users mailing list