From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH setup 0/3] Setup replacement for incver_ifdep
Date: Sat, 06 Feb 2016 14:29:00 -0000 [thread overview]
Message-ID: <56B6033C.3050407@cornell.edu> (raw)
In-Reply-To: <56AB7CD7.5000101@cornell.edu>
On 1/29/2016 9:53 AM, Ken Brown wrote:
> On 1/29/2016 9:22 AM, Jon Turney wrote:
>> On 28/01/2016 20:22, Eric Blake wrote:
>>> On 01/28/2016 01:17 PM, Ken Brown wrote:
>>>>>> install-info $f /usr/share/info/dir ||
>>>>>> install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
>>>>>>
>>>>>> First, what do those double dollar signs mean?
>>>>>
>>>>> If this is from a Makefile snippet, it says that $f is a make
>>>>> variable,
>>>>> while $$ turns into a literal $f for the shell that make invokes
>>>>
>>>> It's not a Makefile snippet; it's a snippet from a bash shell
>>>> script. Here's more context:
>>>>
>>>> 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
>>>>
>>>> It looks to me like all those double dollar signs will just get
>>>> expanded to the PID of the bash process, so that the second
>>>> install-info command is nonsense. But maybe I'm missing something.
>>>
>>> Oooh, scary. Yeah, it looks like utter nonsense, as that would indeed
>>> give the PID of bash followed by a literal f, but who wants to look up
>>> info of '1234f'? I wonder if someone writing the script copied
>>> incorrectly from a Makefile?
>>
>> Crazy. I didn't add this part, so I guess it's been there for a long
>> time.
>>
>>>> Second, why is the second line needed, i.e., under what circumstances
>>>> would it be expected to succeed after the first install-info command
>>>> failed?
>>>
>>> Sadly, I don't know install-info enough to answer that one.
>>
>> I think the first install-info command would fail if the .info file is
>> missing a START-INFO-DIR-ENTRY/END-INFO-DIR-ENTRY block, in which case
>> install-info should fail with a 'install-info: warning: no info dir
>> entry in `xxx.info''
>>
>> Since such a .info file is apparently valid (although I don't think we
>> have any instances of such), I guess the nonsense after the || should be
>> fixed to use '$f' correctly.
>
> I have a few instances of those files on my system:
>
> install-info: warning: no info dir entry in
> `/usr/share/info/automake-history.info.gz'
> install-info: warning: no info dir entry in
> `/usr/share/info/automake-history1.12.info.gz'
> install-info: warning: no info dir entry in
> `/usr/share/info/automake-history1.13.info.gz'
> install-info: warning: no info dir entry in
> `/usr/share/info/texdraw.info.gz'
>
> But I'm not convinced that we need to worry about them. It could be
> that they're intended to be cited from other info files but not to be
> listed in the top level directory. I would say that if an info file
> lacks a START-INFO-DIR-ENTRY/END-INFO-DIR-ENTRY block, we should assume
> that its author didn't want it listed in the directory.
Jon, any further thoughts about this? texinfo-6.1 has just been
released, so I can go ahead with adding the postinstall script as soon
as we decide what it should do in the case of a missing
START-INFO-DIR-ENTRY/END-INFO-DIR-ENTRY block.
Kenb
next prev parent reply other threads:[~2016-02-06 14:29 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 3/3] Add support for 'trigger:' lines in setup.ini Jon Turney
2015-09-22 15:53 ` [PATCH setup 2/3] Remove unfinished, unused support for 'autodep:' " 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
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 [this message]
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=56B6033C.3050407@cornell.edu \
--to=kbrown@cornell.edu \
--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).