This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: units issues


On 2017-05-24 10:26, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> 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.

>> 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.

> 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.

I agree with Achim that currency updates should not be done at
postinstall, as the user could be doing an automated install with no
external access, and we don't know that.

With no guaranteed automatic execution facility, we don't even have a
mechanism, how should updates should be done automatically and how can
we provide this?

Alternative suggestions for automated updates are welcome and why I am
asking here.

For other services, we leave it to users to figure out how to start them
up and shut them down before setup is run.

We could install an /etc/profile.d script which asks the user first time
thru if they want daily currency updates during login over the network,
and then either null or update currencies, and after do or do not update
currencies.

We could document how updates could be run: run the command from the
shell, or add the necessary code to: some profile or profile.d script;
command alias or function wrapper in some profile script; script which
uses units currencies, cron job, or Windows Scheduled Task.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]