From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH setup 0/3] Setup replacement for incver_ifdep
Date: Tue, 24 Nov 2015 16:59:00 -0000 [thread overview]
Message-ID: <56549774.2090008@dronecode.org.uk> (raw)
In-Reply-To: <87bnakmtqc.fsf@Rainer.invalid>
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
On 23/11/2015 18:54, Achim Gratz wrote:
> Jon Turney writes:
>> So, this is actually quite straightforward to write, and
>> /etc/postinstall/0p_update-info-dir.sh becomes the attached.
>>
>>>> Can this be relied on for all possible file systems?
>>>
>>> Not on FAT. But then again, FAT is not really a filesystem, rather just
>>> a failed try.
>>
>> But yes, this does nothing useful if /usr/share/info is on a FAT
>> filesystem, as the mtime doesn't change.
>
> So, should we try to guard against that (installations on a USB stick
> are probably the only practical occurence these days)? I wouldn't mind
> if we just unconditionally rebuild on FAT(32).
Thinking this over, it doesn't seem that hard to use a hash to determine
if the directory has changed.
How about the attached?
(This will add a dependency on diffutils for cmp)
> Otherwise, it looks good and thanks for writing up a script.
[-- Attachment #2: 0p_update-info-dir.sh --]
[-- Type: text/plain, Size: 970 bytes --]
#!/bin/bash
# If an .info file has been added/removed/replaced in /usr/share/info since the
# last time this script ran, rebuild the info directory. We don't simply check
# /usr/share/info's mtime, as that isn't correctly maintained on a FAT
# filesystem.
ls -n /usr/share/info/*info* | md5sum >/usr/share/info/.stamp.tmp
if ! cmp -s /usr/share/info/.stamp.tmp /usr/share/info/.stamp ; then
echo "Rebuilding info directory"
rm -f /usr/share/info/dir.info /usr/share/info/dir
for f in /usr/share/info/*; do
case "$f" in
*\**)
;;
*/dir|*/dir.info*)
;;
*-[0123456789]*)
;;
*)
install-info $f /usr/share/info/dir ||
install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
;;
esac
done
mv /usr/share/info/.stamp.tmp /usr/share/info/.stamp
else
rm /usr/share/info/.stamp.tmp
fi
next prev parent reply other threads:[~2015-11-24 16:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 15:53 Jon Turney
2015-09-22 15:53 ` [PATCH setup 2/3] Remove unfinished, unused support for 'autodep:' lines in setup.ini Jon Turney
2015-09-22 15:53 ` [PATCH setup 3/3] Add support for 'trigger:' " Jon Turney
2015-09-22 15:54 ` [PATCH setup 1/3] Remove unused regex code Jon Turney
2015-09-22 17:33 ` [PATCH setup 0/3] Setup replacement for incver_ifdep Achim Gratz
2015-09-23 17:17 ` Jon Turney
2015-09-23 18:09 ` Achim Gratz
2015-10-12 13:16 ` Jon Turney
2015-10-12 17:38 ` Achim Gratz
2015-10-15 13:18 ` Jon Turney
2015-10-15 18:01 ` Achim Gratz
2015-10-19 15:41 ` Corinna Vinschen
2015-10-19 17:21 ` Achim Gratz
2015-10-20 10:21 ` Corinna Vinschen
2015-11-23 15:14 ` Jon Turney
2015-11-23 18:54 ` Achim Gratz
2015-11-24 16:59 ` Jon Turney [this message]
2015-11-24 18:44 ` Achim Gratz
2015-11-26 10:11 ` Corinna Vinschen
2015-11-26 18:12 ` Achim Gratz
2016-01-28 17:33 ` Jon Turney
2016-01-28 18:06 ` Achim Gratz
2016-01-28 18:41 ` [GOLDSTAR] " Corinna Vinschen
2016-01-29 16:37 ` Andrew Schulman
2016-01-28 18:42 ` Ken Brown
2016-01-28 20:06 ` Eric Blake
2016-01-28 20:17 ` Ken Brown
2016-01-28 20:22 ` Eric Blake
2016-01-29 14:22 ` Jon Turney
2016-01-29 14:53 ` Ken Brown
2016-01-29 19:17 ` Achim Gratz
2016-01-29 21:34 ` Ken Brown
2016-02-06 14:29 ` Ken Brown
2016-02-06 15:31 ` Jon Turney
2016-02-06 15:52 ` Jon Turney
2015-11-23 15:14 ` Jon Turney
2015-10-19 15:33 ` [GOLDSTAR] " Corinna Vinschen
2015-10-19 21:06 ` Andrew Schulman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56549774.2090008@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).