This is the mail archive of the
mailing list for the Cygwin project.
RE: units issues
- From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder at niaid dot nih dot gov>
- To: "cygwin-apps at cygwin dot com" <cygwin-apps at cygwin dot com>
- Cc: "Brian dot Inglis at SystematicSw dot ab dot ca" <Brian dot Inglis at SystematicSw dot ab dot ca>
- Date: Wed, 24 May 2017 16:26:48 +0000
- Subject: RE: units issues
- Authentication-results: sourceware.org; auth=none
- References: <c2742327-a4d3-6e3c-88ad-5cf95af89b8a@SystematicSw.ab.ca> <firstname.lastname@example.org> <e65a0c0b-737e-2d10-b5c9-ef1ee5d6f99d@SystematicSw.ab.ca> <7f2814c4-518a-c097-de05-f4c694dbf362@SystematicSw.ab.ca> <email@example.com> <b2d200f9-2401-50a2-ecc3-567fcad95923@SystematicSw.ab.ca> <f16d69d5-9b9b-0089-b73a-2b0abdc0ce3d@SystematicSw.ab.ca> <firstname.lastname@example.org> <977d9380-31dc-78de-a260-16689664129d@SystematicSw.ab.ca> <5d9a21b5-2c14-c1e8-2c33-6038aef22ace@SystematicSw.ab.ca> <8737bvjxdp.fsf@Rainer.invalid> <2a783f3e-7c6a-20ab-2130-0d8b42c73111@SystematicSw.ab.ca> <CAJ1FpuPCDOah7--87o7-S-jruxsJPhJUD_gg4TU--0xN3Zd11A@mail.gmail.com> <e2260b8d-3a89-427c-2875-d66808c26a52@SystematicSw.ab.ca>
Brian Inglis sent the following at Tuesday, May 23, 2017 10:37 PM
>On 2017-05-23 17:55, Doug Henderson wrote:
>> On 23 May 2017 at 15:49, Brian Inglis wrote:
>>> Updating the currencies only when setup is run seems to me to be
>>> insufficient if users want to use current currency conversions.
>> Currencies needs to be split to a different package from non-currency
>> units. Non-currency units is very static, whereas most currencies
>> changes daily. In the absence of updates, non-currency units are still
>> useful; but currencies are incorrect in most cases, and increasingly
>> so as time pass.
>> It is difficult to predict user requirements based on current package
>> dependencies as non-currency units and currencies are likely used by
>> almost disjoint sets of packages. Users of non-currency units should
>> not be burdened by the complexities of currencies. But if they do need
>> currencies, they should be up to date.
>> A possible solution is to check the currency of the currency data on
>> library initialization or each use by comparing the current date with
>> the data's date of update. When the data is stale, automatically
>> update it if possible, or notify the user of the problem.
>It's a command line utility from GNU with currency conversion factors
>in a separate definition file included from the main file, updated by
>a Python script, which downloads an RSS XML file of current (Euro)
>rates from a free source with a permissive licence, and converts it to
>definitions acceptable to the utility, overwriting the existing file.
>The main issues are that, as currently implemented, currency rates are
>updated automatically by a postinstall script only when setup is run;
>setup may be running in an environment without external access, so the
>postinstall script will generate an error; users may not want or care
>about currency updates; and the postinstall script uses find to avoid
>updating if there is no currency file, or it has been updated recently.
>One option to deal with this is update the package to install a
>zero length currency definitions file, so currency conversions are
>not defined, but the program has no issues, and drop the permanent
>postinstall script to perform updates. Then announce and document that
>users who want updated currency conversion rates need to run the update
>script from the command line, a profile script, cron job, or Windows
>Scheduled Task, as is desirable if they use currency conversions.
>There are also issues with the Python update script, as the currency
>source site cert expired recently, causing the update and postinstall
>scripts to fail, with no workaround other than a replacement or patch;
>and a poster has problems using the update script with Windows proxies,
>which I have addressed to the upstream maintainer for discussion about
>approaches. If there is no response, I will create a Cygwin update patch
>and submit it upstream, but there has been no visible response to issues
>raised on the GNU site.
I would prefer that by default updates happen automatically and those
who do not want automatic updates do something to stop them from
happening. For instance, someone who does not want updates makes the
definitions file read-only and have the script check for write
permission and exit or skip updating if the file cannot be written. A
zero length read-only file works if one is worried about someone using
stale conversion factors. An environmental variable whose existence
marks no-update might be another possibility.
Disclaimer: Statements made herein are not made on behalf of NIAID.