public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: zp_man-db-update-index.dash creates C:\cygwin64\%SystemDrive%
Date: Thu, 25 Nov 2021 19:51:09 +0100	[thread overview]
Message-ID: <87ee74oyqq.fsf@Rainer.invalid> (raw)
In-Reply-To: <b6159451-c23b-5243-ca46-92cc7cee419b@SystematicSw.ab.ca> (Brian Inglis's message of "Thu, 25 Nov 2021 00:59:39 -0700")

Brian Inglis writes:
> On 2021-11-24 12:54, Achim Gratz wrote:
>> Brian Inglis writes:
>>> Problem mentioned by me some time ago, may be related to this, from
>>> undocumented mandb handling of Windows localization catalog folders:
>
>> It isn't, which could have easily been tested.
>
> Are you saying that the <CygwinRoot>/%SystemDrive% issue is unrelated
> to mandb execution, contrary to the information from the OP?

Yes, all the time, and now again.

> How can it be tested, as I would like to do so, as I get those symptoms.

mkdir -p /tmp/test/{s,p}d2 /tmp/test/{s,p}d3/sub
cd /tmp/test
env -i                          /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i SystemDrive=sd1          /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i ProgramData=pd1          /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i SystemDrive=sd2          /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i ProgramData=pd2          /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i SystemDrive=sd3/sub      /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i ProgramData=pd3/sub      /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i SystemDrive=sd3/nil      /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i ProgramData=pd3/nil      /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i SystemDrive=sd3/void/nil /usr/bin/cygstart --hide /usr/bin/dash -c echo
env -i ProgramData=pd3/void/nil /usr/bin/cygstart --hide /usr/bin/dash -c echo
ls -R
# cd ; rm -fr /tmp/test

The behaviour with absolute paths is left as an exercise for the reader.

> I found that when setup is executed, as the PATH sanitized for scripts
> includes cygpath -S, mandb appears to search directories in the
> Windows PATH, for cat... directories, may remove the contents, even
> when they are not manual pages, and may perform other poorly or
> undocumented operations.

Again, in no variant of trying to reproduce this was I ever successful
in seeing that happen.  So either this problem is no longer occuring or
there is some extra condition for it to trigger.

> It appears that mandb climbs the tree trying to find related bin and
> man dirs.

There's no code in mandb that obviously does this, so you'll have to
provide some evidence of when and where it happens.  And it should
already show up in the output of 'manpath -dc' I think, since I've only
ever seen mandb removing something that is in catdirs.  So for instance
if I drop bogus directories cat9 and de_AT into /var/cache/man (which
don't have a corresponding manpath obviously), I'll see:

--8<---------------cut here---------------start------------->8---
Removing obsolete cat directory /var/cache/man/cat9...
Seen mandir for /var/cache/man/ca; not deleting
Seen mandir for /var/cache/man/cs; not deleting
Seen mandir for /var/cache/man/da; not deleting
Seen mandir for /var/cache/man/da.ISO8859-1; not deleting
Seen mandir for /var/cache/man/da.UTF-8; not deleting
Seen mandir for /var/cache/man/de; not deleting
Seen mandir for /var/cache/man/de.ISO8859-1; not deleting
Seen mandir for /var/cache/man/de.UTF-8; not deleting
Removing obsolete cat directory /var/cache/man/de_AT...
--8<---------------cut here---------------end--------------->8---

Which is correct since /var/cache/man is the only catdir on my system.
If I drop these anywhere else in any of the directory in PATH mandb will
not touch them (in fact it never bothers to look there).

> It may be having shared man and "stray" cat dirs for other Windows
> package commands, cmd, Windows utilities, and systems (-m) under 
> /proc/cygdrive/c/usr/local/.
> I don't know any other way I could keep the system level shared
> contents accessible while isolating it.

Again, if that's the problem I have not been able to reproduce it.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

  reply	other threads:[~2021-11-25 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  9:06 Миронов Леонид Владимирович
2021-11-24 17:31 ` Brian Inglis
2021-11-24 18:23   ` Achim Gratz
2021-11-24 18:34     ` Brian Inglis
2021-11-24 19:54       ` Achim Gratz
2021-11-25  7:59         ` Brian Inglis
2021-11-25 18:51           ` Achim Gratz [this message]
2021-11-28 23:17             ` Brian Inglis
2021-11-29  9:52               ` ASSI
2021-11-24 18:19 ` Achim Gratz
2021-11-24 18:30   ` Brian Inglis

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=87ee74oyqq.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@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).