[wpkg-users] Accessing WPKG parameters

Malte Starostik malte at malte.homeip.net
Tue Oct 20 22:28:58 CEST 2009


I partially did something like that in perl.  It reads 
{hosts,packages,profiles}{,/*}.xml plus each client's wpkg.xml as copied to 
the server on the client's previous run.  Then it walks the host's profiles 
and packages and their dependencies and matches what should be installed with 
what actually is installed and outputs discrepancies.  The way I use it it 
currently only builds some JSON formatted summary as to how many hosts are out 
of sync with their profiles, but the backend provides for more detailed 
information.
Well, so much for the theory, in fact for now it only supports flat 
configurations, i.e. no {hosts,packages,profiles}/ subdirectories and only 
full hostnames without regexps or IPs.
The whole thing will NOT get you an exact list of what packages WPKG is to 
install in what order, but you can get a list of packages that a client needs 
to install, uninstall, or up/downgrade.  The packages' execute attribute is 
not considered and neither are checks (the script runs solely on the server).  
Also, include dependencies are treated as if they were regular or chained 
dependencies.  There is no expansion of variables as recently added to WPKG. 
Suffices for my needs.
The code is somewhat integrated with other stuff, I can see if I can easily 
extract the pertinent parts tomorrow - if you're interested.
Out of my memory, it requires only the XML::LibXML module, but IMBW.

Regards,
Malte

Am Dienstag, 20. Oktober 2009 22:07:52 schrieb simplesi:
> mangoo wrote:
> > Check the hostname, and then, check against the remote hosts.xml?
> 
> yes - that would work - I was just wondering if there was an easy way
> already :)
> 
> regards
> 
> Simon
> 



More information about the wpkg-users mailing list