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

Paul McGrath J.P.McGrath at leeds.ac.uk
Mon Aug 22 14:29:20 CEST 2011


Hi Rainer,
  Thanks for detailing the cause.  I renamed my hosts\default.xml to zzdefault.xml and now it listed all the profiles being applied.  I would prefer it that way so all my definitions are in sub folders as I would forget it I moved the entries to the top level hosts.xml.
  Thank you for the clarification.  Also a massive congrats on a great piece of software it is massively useful and my colleague says it is 'bad ass'.
Paul


-----Original Message-----
From: Rainer Meier [mailto:r.meier at wpkg.org] 
Sent: 22 August 2011 12:46
To: Paul McGrath
Cc: 'wpkg-users at lists.wpkg.org'
Subject: Re: [wpkg-users] wpkg not installing packages for user, only using default

Hi Paul,

On 22.08.2011 13:22, Paul McGrath wrote:
> WPKG 1.2.1-RC8 starting...

Correct version seems to be launched.


> Trying to read XML files from directory: p:\profiles
> Reading XML file: p:/profiles/default.xml
> Reading XML file: p:/profiles/groups.xml
> Reading XML file: p:/profiles/limm.xml
> Reading XML file: p:/profiles/printers.xml
> Reading XML file: p:/profiles/software.xml
> Reading XML file: p:/profiles/win7.xml
> Reading XML file: p:/profiles.xml

All profiles read correctly in alphabetical order. "profiles.xml" read last. 
Looks all fine.


> Trying to read XML files from directory: p:\hosts
> Reading XML file: p:/hosts/andrew.xml
> Reading XML file: p:/hosts/default.xml
> Reading XML file: p:/hosts/epbi-cgb.xml
> Reading XML file: p:/hosts/exon-crb-rob.xml
> Reading XML file: p:/hosts/genomics-csb6.xml
> Reading XML file: p:/hosts/gnts-wtbb9.xml
> Reading XML file: p:/hosts/haem-wtbb6.xml
> Reading XML file: p:/hosts/limmFacilities.xml
> Reading XML file: p:/hosts/limmGroups.xml
> Reading XML file: p:/hosts/moga-wtbb9-csb.xml
> Reading XML file: p:/hosts/mscd-cah.xml
> Reading XML file: p:/hosts/mscd-wtbb6-8.xml
> Reading XML file: p:/hosts/opne-wtbb8.xml
> Reading XML file: p:/hosts/pthy-wtbb4.xml
> Reading XML file: p:/hosts/socr-crb-bex.xml
> Reading XML file: p:/hosts/tass-csb7-8.xml
> Reading XML file: p:/hosts/ther-wtbb7.xml
> Reading XML file: p:/hosts/tmed-wtbb-8-9-csb.xml
> Reading XML file: p:/hosts.xml

All hosts read in alphabetical order. "host.xml" read last. Looks fine too.

However here the issue might start. As you can see the second file read is 
"default.xml". It is likely to contain your "catch-all" definition with your 
default profile assigned. Something like

   <host name='.*' profile-id='default' />


In earlier versions of WPKG the algorithm was just using a pure enumeration of 
files within hosts/ directory. On Windows hosts this seem to have worked and 
sorted the files in alphabetical order while I discovered that at least on my 
Linux host this lead to some different enumeration order. That's why version 
1.2.1-RC8 explicitly does a literal ordering of the files before reading them.

Maybe for you it was just working because for you the enumeration was "by 
chance" enumerating in the correct order.

If your "default.xml" really contains a "catch-all" entry, then you should make 
sure it's read last. For example by renaming it to "zz-default.xml". 
Alternatively (my recommendation) put the catch-all entry into P:/hosts.xml 
which is always read last.

The reason for this is that WPKG starts to match the current host starting from 
top to the last entry. When WPKK encounters a match it stops the matching 
process and assigns the matching profile.
So if one of the first entries match to any host, then all hosts will matchi 
this profile while further definitions are ignored.

If you intend to match the default profile AND a specific profile, then you can 
use the /applyMultiple switch or config.xml setting. But remember to check all 
entries for eventual "overmatching" which might lead to unexpected profile 
assignment.


> Trying to read XML files from directory: p:\packages
> Reading XML file: p:/packages/4d.xml
[...]
> Reading XML file: p:/packages/zipcentral.xml
> Reading XML file: p:/packages.xml

Packages seem to get read in correct order too.

> [...]
> Single-match mode. Host match finished.

You're using single-host matching mode. Which is good from my point of view.

> Profiles applying to the current host:
> default

Likely this profile was defined in "default.xml" which is evaluated second.

 > [...]

Everything else is just about applying the profile.

PS: I am copying the list too. For others as a reference.


br,
Rainer



More information about the wpkg-users mailing list