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

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