This is the mail archive of the
mailing list for the Cygwin project.
Re: units issues
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 23 May 2017 15:49:37 -0600
- Subject: Re: units issues
- Authentication-results: sourceware.org; auth=none
- References: <c2742327-a4d3-6e3c-88ad-5cf95af89b8a@SystematicSw.ab.ca> <email@example.com> <e65a0c0b-737e-2d10-b5c9-ef1ee5d6f99d@SystematicSw.ab.ca> <7f2814c4-518a-c097-de05-f4c694dbf362@SystematicSw.ab.ca> <firstname.lastname@example.org> <b2d200f9-2401-50a2-ecc3-567fcad95923@SystematicSw.ab.ca> <f16d69d5-9b9b-0089-b73a-2b0abdc0ce3d@SystematicSw.ab.ca> <email@example.com> <977d9380-31dc-78de-a260-16689664129d@SystematicSw.ab.ca> <5d9a21b5-2c14-c1e8-2c33-6038aef22ace@SystematicSw.ab.ca> <8737bvjxdp.fsf@Rainer.invalid>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
On 2017-05-23 11:28, Achim Gratz wrote:
> Brian Inglis writes:
>> The easiest approaches to this would be:
>> - rename or delete postinstall script which might upset cygcheck or
>> setup remove
>> - null /usr/share/units/currency.units, as it is required and produces
>> an error message if not available, but if it is empty, everything works.
> Nope. The user should not have to muck with packaged files at all.
>> It is not very useful if not up to date (I run the update daily), and if
>> not up to date, might as well be empty, but some opinions may differ.
> The issue is that you cannot assume that postinstall scripts are able to
> access the network at all. Where this isn't possible the administrator
> will have to find a different way of keeping those files up-to-date
> (which should also not be packaged), but that's something to maybe just
> document. But you will have to provide some way of letting the user
> specify if that updating is OK. If you want this to be possible during
> the initial install you might even need to provide another sub-package
> whose only purpose is to confer this decision (it could be empty and
> just doing a simple postinstall action).
>> In the postinstall script find which ensures updates happen at most daily:
> I've asked specifically to structure any perpetual postinstall script in
> a way that it doesn't do any non-necessary work, be it forking or
> otherwise unless it is going to actually do something useful. A simple
> file test that exits the postinstall script when the file is or isn't
> there satisfies that constraint, running commands and scripts doesn't.
Updating the currencies only when setup is run seems to me to be
insufficient if users want to use current currency conversions.
Would the best approach be to punt on running the update script at all,
install a null /usr/share/units/currency.units file, announce and
document that if currency conversions are desirable, the user should
arrange to run the update script, either from the command line, profile,
cron job, or Task Scheduler?
If we kept the postinstall script, we could change it to run only if the
currency.units file is non-null and drop the time check:
[ -s /usr/share/units/currency.units ] && /usr/bin/units_cur
or keep the time check, using find -mtime +0, or date and stat.
I have followed up with the upstream maintainer AdrianM at GNU dot org
about the Python currency update script issues with no response yet.
Does anyone have contact or know a better address to try? PM if so.
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada