[wpkg-users] wpkg not installing packages for user, only using default

Rainer Meier r.meier at wpkg.org
Fri Aug 19 22:49:20 CEST 2011


Hi Donny,

On 19.08.2011 22:35, Donny Brooks wrote:
> Ok, with that script I have found that it is pulling the default.xml file but it
> says the proper host name earlier in the file. What could be causing this? I am
> attaching the output of the log file. So it helps I will also include the
> hostname.xml and such to help troubleshoot this. I am using blank hosts.xml,
> profiles.xml, packages.xml and just using the individual xml files in the folders.

I am currently not having lots of time to read all your attachments. But I could 
bet the ordering of host definitions read is incorrect in your hosts database.

WPKG in default mode starts to match hosts in the order read from the files in 
hosts/*.xml.

So if you define a host called ".*" (which basically matches any host) then WPKG 
will stop here because it has found a matching host.

Having a look at your log I see that one of the first host definitions read is 
hosts/default.xml. So if this one defines a "catch all" host definition, then 
WPKG will likely match it and stop evaluating.

There are two solutions for that:

Either you re-arrange the host definitions by renaming the files or you use 
multiple-host matching.

The first one means you should likely rename your default.xml to something like 
"zz-default.xml" so it is read last and the host definition within is appended 
at the end of the hosts definitions. So it will only match if no previous host 
definition matched the executing host.

If you opt for the second option you have to use the applyMultiple switch either 
in config.xml or at command line. This will make WPKG continue and applying ALL 
host definitions which match to the current host. So for example if your host is 
named "hostname" and you have one profile for "host.*", another for "hostname" 
and a third one for ".*" then WPKG will apply ALL THREE profiles.
Please carefully think about if this is what you want because any overmatching 
in any host definition in your hosts/*.xml files will likely lead to more 
profiles assigned to a host than intended.

I actually recommend the first option. Making sure each hosts gets only one 
single profile assigned. You can still apply "default" profile by specifying 
dependencies between profiles.


br,
Rainer



More information about the wpkg-users mailing list