[wpkg-users] value have underscores?
J.P.McGrath at leeds.ac.uk
Tue May 15 12:24:57 CEST 2012
Whilst I was waiting a reply I had a test myself and it worked. I didn't go as deep as you and 'debug'.
I asked because the latest Adobe Flash ocx and dll files are now named including the version as underscores. So a file exists check is easier than before.
From: Rainer Meier [mailto:r.meier at wpkg.org]
Sent: 15 May 2012 11:10
To: Paul McGrath
Cc: wpkg-users at lists.wpkg.org
Subject: Re: [wpkg-users] value have underscores?
On 15.05.2012 10:40, Paul McGrath wrote:
> So far I have just used '.' (dots, full stops, periods!) to denote
> version variables. Is it possible to use '_' (underscores) e.g.
> <variable name="version" value="11_1_102_55"/>
> If the version is incremented then will upgrade work based on a value
> containing '_'?
I've done a quick test and in this case it works. Quickly tested your version number and then upgraded to 11_1_102_56:
2012-05-15 12:03:07, DEBUG : Comparing version: '11_1_102_56' <=> '11_1_102_55'.
2012-05-15 12:03:07, DEBUG : Comparing version fragments: '11' <=> '11'
2012-05-15 12:03:07, DEBUG : Comparing version fragments: '1' <=> '1'
2012-05-15 12:03:07, DEBUG : Comparing version fragments: '102' <=> '102'
2012-05-15 12:03:07, DEBUG : Comparing version fragments: '56' <=> '55'
2012-05-15 12:03:07, INFO : Package 'Testing package' (test): Already
installed but version mismatch.|Installed revision: '11_1_102_55'|Available
revision: '11_1_102_56'.|Preparing upgrade.
Although I still recommend to use standard "dotted" notation as the above one
works only because WPKG splits each part of the version number by non-numeric
characters. So therefore 11_1_102_55 is not interpreted as "220.127.116.11" but as
the expression 11_1_102_55 which is split into distinct numbers and then
compared piece by piece.
But as said, in your case it works perfectly as long as you just use digits
split by non-digit characters. Seamlessly 11v1v102v55 would work too.
More information about the wpkg-users