[wpkg-users] [Bug 192] New: Regular Expression Matching problem in Function getHostNode()
bugzilla-daemon at bugzilla.wpkg.org
bugzilla-daemon at bugzilla.wpkg.org
Wed Oct 13 00:20:50 CEST 2010
http://bugzilla.wpkg.org/show_bug.cgi?id=192
Summary: Regular Expression Matching problem in Function
getHostNode()
Product: WPKG
Version: 1.1.2
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Severity: normal
Priority: P2
Component: wpkg.js
AssignedTo: mangoo at wpkg.org
ReportedBy: erikr at grrl.lib.mn.us
QAContact: wpkg-users at lists.wpkg.org
This is a shortened version of my hosts.xml file, it shows an example where the
problem occurs.
<wpkg>
<!-- each branch gets their own profile (ex. GRRL-SC95, GRRL-SC100,
GRRL-WP105, etc.) -->
<host name="GRRL-SC[0-9]{2,3}" profile-id="saintcloud" />
<host name="GRRL-WP[0-9]{2,3}" profile-id="waitepark" />
<!-- all other staff computers that don't belong to a specific branch
profile (ex. GRRL-BR101, GRRL-DE150, GRRL-XX, etc.) -->
<host name="GRRL-..[^Pp].+" profile-id="staff" />
<!-- all public computers -->
<host name="GRRL-..[Pp].+" profile-id="public" />
</wpkg>
Normally a computer named GRRL-SC100 would get the "saintcloud" profile-id.
The problem is it skips this and gets the "staff" profile-id instead.
In wpkg.js on line 1610, the function getHostNode() does the host name checking
to decide which profile-id the host gets. This is a summary of what the
function does.
function getHostNode() {
// get the host name
// get list of available host definitions from hosts.xml
// try non-regular-expression matching
// try IPv4-address matching
// try regular expression matching
}
If I change the order of the last two checks, so that regular expression
matching is done before IP-address matching, then everything works. Somehow
the IP-address matching is messing something up before it gets to regular
expression matching. I can't figure out what the IP-address checking is doing
but computers don't get matched to the correct profile-id.
--
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the wpkg-users
mailing list