[wpkg-users] hosts.xml - is multi profile membership possible?

Rainer Meier r.meier at wpkg.org
Thu Sep 4 15:18:40 CEST 2008


Hi Kamil,

Kamil Maciejewski wrote:
> Hello everyone, since I'm here, I'd like to ask my few questions:
> 1. Is there some way to use NOT EXIST as condition to install package? 
> Why would I want to do this? Because I'd like to have packages that 
> would ony upgrade installed software without doing anything when the old 
> version is not installed. So package should check - if the software is 
> not installed, it's ok, if it is installed - do an upgrade.

This sounds a little curious to me.
A package contains the following types of commands:
- install
- update

If a package is already installed and the package version is increased, 
then WPKG will execute the update command(s). As I understood from above 
it is fine to run some update command when the package is already there.

If the package is not yet installed at all, then WPKG will run the 
install command (which can be different to the update command).


> 2. Multi profile membership - best way is to explain this is an example 
> - we have 3 computers and 4 packages - if we want computer #1 have 
> installed packages 1,2, then #2 packages 2,3, and #3 packages 1,3 - I 
> could create a profile for each machine, but when I have about a 100 
> machines? If I could split packages into few groups and can add hosts to 
> more than one of them it would be ok, but as far as I tried typing in 
> hosts.xml:
> 
>     <host name="compname" profile-id="profile" />
>     <host name="compname" profile-id="other_profile" />
> 
> 
> It only uses the first profile :(
> I'd really like to have something like this working without creating 
> dozens of profiles (having e.g. 100 machines and 20 different packages 
> gives a really huge number of combinations).

This is supported in WPKG 1.1.x milestone release. Please try the 
following syntax:

<host name="compname">
	<profile id="profile" />
	<profile id="other_profile" />
</host>


Alternatively you could create a profile structure where you create a 
"virtual" profile called "compname" which depends on the "profile" 
profile as well as on the "other_profile" profile without adding 
additional packages. The effect would be that all packages from profile 
and other_profile would apply to this "compname" profile.


br,
Rainer



More information about the wpkg-users mailing list