[wpkg-users] WPKG-GP file modification date comparison fail
Oliver Sauder
os at esite.ch
Mon Aug 11 16:25:30 CEST 2014
I actually answered this question on the WPKG-GP mailing list as this
question has been posted there as well.
Here an extract of the answer:
> Wpkg-GP.ini has the modification date of the present because Wpkg-GP
> when loading the ini file will always rewrite it to make sure that
> certain settings are set correctly (e.g. it encrypts the password).
More here <https://groups.google.com/forum/#!topic/wpkg-gp/seIJyIsWJbk>.
Oliver
On 11.08.2014 17:16, Rainer Meier wrote:
> Hi Pete,
>
> On 11.06.2014 11:21, Pete Boyd wrote:
>> Hi. I have an issue where I compare 2 files based on their
>> modification date, WPKG-GP gets a modification date of the current
>> time rather, than the actual modification date the file has:
>>
>> Using WPKG-GP on Windows 7, I have a package that just deploys the
>> WPKG-GP config file. I do a modification date comparison of the
>> config file between the version in the Program Files directory and
>> the version I deploy, using:
>>
>> <check type="file" condition="datemodifyequalto"
>> path="%PROGRAMFILES%\Wpkg-GP\Wpkg-GP.ini"
>> value="@%SOFTWARE%\wpkg-gp\Wpkg-GP.ini"/>
>>
>> I do this the same way for Firefox and Thunderbird config files and
>> they work fine. However WPKG-GP's doesn't work because of the
>> following:
>>
>> "Reading last modification date of 'C:\Program
>> Files\Wpkg-GP\Wpkg-GP.ini'.
>>
>> Reading file modification date of reference file
>> '\\server\windows-admin\wpkg\packages\wpkg-gp\Wpkg-GP.ini'.
>>
>> Reading last modification date of
>> '\\server\windows-admin\wpkg\packages\wpkg-gp\Wpkg-GP.ini'.
>>
>> Modification date of file 'C:\Program Files\Wpkg-GP\Wpkg-GP.ini' is
>> Tue Jun 10 16:16:24 UTC+0100 2014 which isn't equal to the
>> comparison date Thu May 15 11:25:20 UTC+0100 2014 check failed."
>>
>> It is getting the modification date of the present moment at which
>> it has just copied the file, which surely is wrong? When I look on
>> disk, both files have the same last modification date and creation
>> date. The file in Program Files does not have this modification
>> date of the present moment.
>
> Are you sure your package specification is alright and WPKG-GP
> doesn't do any fancy thing to the Wpkg-GP.ini file while running?
> Perhaps this is a glitch of Windows when reading modification dates
> of files which are currently locked for read/write as I assume
> WPKG-GP will be running while WPKG is running. Solution might be that
> WPKG-GP should read the INI file and close it before invoking WPKG.
> Or open it in read-only mode. However these are just wild-guesses.
>
> As you say it works fine with Thunderbird and Firefox I don't expect
> this to be WPKG code issue. Moreover I have just done some fixes in
> WPKG 1.3.1 and released it as WPKG 1.3.2-RC1. I also did some
> reference-date comparison tests and all of them worked fine for me.
>
> br, Rainer
> -------------------------------------------------------------------------
>
>
SSLrack gives free SSL certificates for open source projects (and cheap
> for everyone else)!
> http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects
>
>
> -------------------------------------------------------------------------
>
>
wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________ wpkg-users mailing
> list wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>
More information about the wpkg-users
mailing list