Re: man incredibly slow because it scans for share directory in PATH??

2016-06-14 Thread Achim Gratz
Linda Walsh writes:
> Achim Gratz wrote:
>> with the POSIX shells you shouldn't have a MANPATH variable set at all
>> unless you did that yourself in one of your configuration files.
> ---
>   Not exactly sure where it came from (looks like an older
> version of some cygwin package)

Well, it says "base-files 3.9-3", so this is from …wait… December 2009.

> I added some unrelated debug stuff
> that came from my linux system).

Now, when you do that, it prevents any later releases from replacing
your file with the newer version in /etc/defaults and you're expected to
check the differences yourself and either switch back to the default
version or carry whatever changes you've made.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-14 Thread Linda Walsh

Achim Gratz wrote:

with the POSIX shells you shouldn't have a MANPATH variable set at all
unless you did that yourself in one of your configuration files.

---
Not exactly sure where it came from (looks like an older
version of some cygwin package) but my /etc/profile sets MANPATH
and there are comments in /etc/skel/.bash_profile (and 
/etc/defaults/etc/skel/.bash_profile).  I see a ".orig" (my vim-
set extension for files I edit - I added some unrelated debug 
stuff that came from my linux system).


The comments in the skel files, FYI, say:

# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
#   MANPATH="${HOME}/man:${MANPATH}"
# fi

In /etc/profile I see [condensed from original version]:
# base-files version 3.9-3
# WARNING -- IF THIS FILE IS MODIFIED IT WILL NOT BE UPDATED 
# BY THE CYGWIN SETUP PROGRAM.  IT BECOMES YOUR RESPONSIBILITY.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/profile
# Some resources... [...]
# Setup some default paths. Note that this order will allow user 
# installed software to override 'system' software settings.

# If you wish to change the path for all users, it is recommended you edit
#  /etc/bash.bashrc
# If you wish all future users to have some default setup, it is recommended
# you edit /etc/skel/.bashrc
# If you wish to change the path on a user by user basis, it is recommended
# you edit ~/.bashrc
PATH=/usr/local/bin:/usr/bin:/bin:$PATH; export PATH
MANPATH=/usr/local/man:/usr/share/man:/usr/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:$INFOPATH; export INFOPATH
[...]
-

 As cygwin doesn't use "rpm" or any of the other utils that share that
format, it doesn't create any ".rpm{new,orig,save}" files that
contain contain new & old versions of config files & give some indication to
the user that a newer install had changes to the config.

 The only thing that is apparent is that some version of /etc/profile
*used* to set MANPATH, but no longer, whereas on my linux box, some distros
have had something like:


MANPATH="${MANPATH:+$MANPATH:}\
`test -x /usr/bin/manpath && /usr/bin/manpath -q`"

has been added for POSIX compatible shells so that "man" can be configured
to pickup system-specific manpath values from /etc/manpath.config.

 BTW, as for POSIX compatibility, before 2002, POSIX's charter
said that its recommendations were "descriptive".  Its purpose
was to allow future programs to be compatible with what was
already there.

After 2001, or so, the POSIX name changed hands and the new charter 
became "prescriptive" (i.e. it started issuing change requirements

that required existing SW to change if they wanted to remain
POSIX compat.  These days, you need to specify what version of
POSIX (the Portable, _One_ System Interface data eXchange standard)
you are referring to, since the newer the POSIX version, the more
likely it isn't compatible with what you already have or are used
to.

 I.e. it had been intended to apply to new SW being written so
that it would be compatible with what was "out there", but under
new leadership/ownership, was re-chartered to require existing 
SW to make changes that were not backward compatible (thus
breaking the original POSIX's portability guarantees).  So 
sometime after 2000-2001, the new POSIX standard was no 
longer portable to existing systems following the original

standard.  :-(

-l
















--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-13 Thread Achim Gratz
Linda Walsh writes:
> I.e. in a console window, if you type:
>
>  > echo $MANPATH 

Well, it turns out that complete.tcsh sets MANPATH to "/usr/share/man:"
if it's unset, so if you're using tcsh you'll most likely get that.  But
with the POSIX shells you shouldn't have a MANPATH variable set at all
unless you did that yourself in one of your configuration files.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-13 Thread Linda Walsh

Achim Gratz wrote:

Riedel,Till (TM) writes:

IMHO at least in Windows/Cygwin creating MANPATH from PATH makes no
sense! (although I now get the idea what was the rationell!)
Reasonably setting MANPATH should IMHO be a default...


MANPATH is unset in a standard Cygwin installation since quite some time
and it wasn't constructed from PATH before that change.


I.e. in a console window, if you type:

 > echo $MANPATH 


What do you see?  On my system, I see a rather short version that
isn't exactly right as it has non-existing directories in it:
 
 /usr/local/man:/usr/share/man:/usr/man::/usr/openwin/man


But since they are at the end, it doesn't much seem to matter.  On 
a linux distro, All of the directories in MAN seem to exist and have

man pages in them:

 /home/lindaw/share/man:/usr/local/man:/usr/local/share/man:\
 /usr/share/man:/opt/kde3/share/man:/usr/man:/opt/dx/man:\
 /opt/mpich/man

(backslashes inserted by me for readability).

According to the cywin manpage for man, man has a config file
that tells it where to search in "/etc/man_db.conf".







--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-12 Thread Achim Gratz
Riedel,Till (TM) writes:
> IMHO at least in Windows/Cygwin creating MANPATH from PATH makes no
> sense! (although I now get the idea what was the rationell!)
> Reasonably setting MANPATH should IMHO be a default...

MANPATH is unset in a standard Cygwin installation since quite some time
and it wasn't constructed from PATH before that change.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-12 Thread Riedel,Till (TM)
> You have lots of duplicated, obsolete and overlapping paths in your 
%PATH%.

> I suggest you start from some homecleaning.
> Not to mention strange ones, like "/".

Thx alot!

I know that my path is messy, but having "/" in the path should not be 
all too fatal.


Furthermore, I probably did not set any of those strange paths myself 
(this is afterall Windows ;) ).


@Eliot: Good idea to set MANPATH!

>MANPATH=/usr/share/man PATH="/usr/bin:/foo" strace man bar |grep 
'foo/share'


returns nothing and fixes the issue!

IMHO at least in Windows/Cygwin creating MANPATH from PATH makes no 
sense! (although I now get the idea what was the rationell!) Reasonably 
setting MANPATH should IMHO be a default...


BR

Till



Am 6/12/2016 um 12:49 PM schrieb Andrey Repin:

Greetings, Riedel,Till (TM)!


I traced down my problem with really slow man page views this:



{{{


 >>PATH="/usr/bin:/foo" strace man bar |grep 'foo/share'


}}}



I am getting this:



{{{



13   39756 [main] man 6688 normalize_posix_path: src /foo/share/man
16   39772 [main] man 6688 normalize_posix_path: /foo/share/man =
normalize_posix_path (/foo/share/man)
13   39785 [main] man 6688 mount_info::conv_to_win32_path:
conv_to_win32_path (/foo/share/man)
12   39810 [main] man 6688 mount_info::conv_to_win32_path: src_path
/foo/share/man, dst C:\tools\cygwin\foo\share\man, flags 0x3000A, rc 0
16   39912 [main] man 6688 mount_info::conv_to_win32_path:
conv_to_win32_path (/foo/share)
14   39942 [main] man 6688 mount_info::conv_to_win32_path: src_path
/foo/share, dst C:\tools\cygwin\foo\share, flags 0x3000A, rc 0



}}}



If my PATH is the real one this goes on forever, and generates some
problems,like:


You have lots of duplicated, obsolete and overlapping paths in your %PATH%.
I suggest you start from some homecleaning.
Not to mention strange ones, like "/".


{{{


 >>time man bar

No manual entry for bar



real0m23.650s
user0m0.000s
sys 0m0.108s



hanging e.g. on



20 2449004 [main] man 8124 mount_info::conv_to_win32_path: src_path
//share/man, dst \\share\man, flags 0x4022, rc 0



}}}



VS.



{{{


 >>PATH=/usr/bin/ bash -c "time man bar"

No manual entry for bar



real0m0.082s
user0m0.031s
sys 0m0.045s



}}}



Any ideas why man does look for "share" in the whole path? Tbh I haven't
looked at the man source code. Thx in advance!





--
KIT- Research University in the Helmholtz Association

Dr.-Ing. Till Riedel
Lab Leader TECO, SDSC-BW/SDIL

Karlsruhe Institute of Technology (KIT)
Institute of Telematics (TM)
Pervasive Computing Systems - Prof. Beigl


Bldg. 07.07., Room 211
Vincenz Prießnitz Str. 1, 76131 Karlsruhe

+49 (0)721 608 41706
www.teco.kit.edu/~riedel

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: man incredibly slow because it scans for share directory in PATH??

2016-06-12 Thread Andrey Repin
Greetings, Riedel,Till (TM)!

> I traced down my problem with really slow man page views this:

> {{{

 >>PATH="/usr/bin:/foo" strace man bar |grep 'foo/share'

> }}}

> I am getting this:

> {{{

> 13   39756 [main] man 6688 normalize_posix_path: src /foo/share/man
> 16   39772 [main] man 6688 normalize_posix_path: /foo/share/man = 
> normalize_posix_path (/foo/share/man)
> 13   39785 [main] man 6688 mount_info::conv_to_win32_path: 
> conv_to_win32_path (/foo/share/man)
> 12   39810 [main] man 6688 mount_info::conv_to_win32_path: src_path 
> /foo/share/man, dst C:\tools\cygwin\foo\share\man, flags 0x3000A, rc 0
> 16   39912 [main] man 6688 mount_info::conv_to_win32_path: 
> conv_to_win32_path (/foo/share)
> 14   39942 [main] man 6688 mount_info::conv_to_win32_path: src_path 
> /foo/share, dst C:\tools\cygwin\foo\share, flags 0x3000A, rc 0

> }}}

> If my PATH is the real one this goes on forever, and generates some 
> problems,like:

You have lots of duplicated, obsolete and overlapping paths in your %PATH%.
I suggest you start from some homecleaning.
Not to mention strange ones, like "/".

> {{{

 >>time man bar
> No manual entry for bar

> real0m23.650s
> user0m0.000s
> sys 0m0.108s

> hanging e.g. on

> 20 2449004 [main] man 8124 mount_info::conv_to_win32_path: src_path 
> //share/man, dst \\share\man, flags 0x4022, rc 0

> }}}

> VS.

> {{{

 >>PATH=/usr/bin/ bash -c "time man bar"
> No manual entry for bar

> real0m0.082s
> user0m0.031s
> sys 0m0.045s

> }}}

> Any ideas why man does look for "share" in the whole path? Tbh I haven't 
> looked at the man source code. Thx in advance!


-- 
With best regards,
Andrey Repin
Sunday, June 12, 2016 13:47:12

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



man incredibly slow because it scans for share directory in PATH??

2016-06-12 Thread Riedel,Till (TM)

Hi,

I traced down my problem with really slow man page views this:

{{{

>PATH="/usr/bin:/foo" strace man bar |grep 'foo/share'

}}}

I am getting this:

{{{

   13   39756 [main] man 6688 normalize_posix_path: src /foo/share/man
   16   39772 [main] man 6688 normalize_posix_path: /foo/share/man = 
normalize_posix_path (/foo/share/man)
   13   39785 [main] man 6688 mount_info::conv_to_win32_path: 
conv_to_win32_path (/foo/share/man)
   12   39810 [main] man 6688 mount_info::conv_to_win32_path: src_path 
/foo/share/man, dst C:\tools\cygwin\foo\share\man, flags 0x3000A, rc 0
   16   39912 [main] man 6688 mount_info::conv_to_win32_path: 
conv_to_win32_path (/foo/share)
   14   39942 [main] man 6688 mount_info::conv_to_win32_path: src_path 
/foo/share, dst C:\tools\cygwin\foo\share, flags 0x3000A, rc 0


}}}

If my PATH is the real one this goes on forever, and generates some 
problems,like:


{{{

>time man bar
No manual entry for bar

real0m23.650s
user0m0.000s
sys 0m0.108s

hanging e.g. on

   20 2449004 [main] man 8124 mount_info::conv_to_win32_path: src_path 
//share/man, dst \\share\man, flags 0x4022, rc 0


}}}

VS.

{{{

>PATH=/usr/bin/ bash -c "time man bar"
No manual entry for bar

real0m0.082s
user0m0.031s
sys 0m0.045s

}}}

Any ideas why man does look for "share" in the whole path? Tbh I haven't 
looked at the man source code. Thx in advance!


BR

Till

PS: aliasing man with a limited PATH works for me...

Cygwin Configuration Diagnostics
Current System Time: Sun Jun 12 10:33:15 2016

Windows 10 Professional Ver 10.0 Build 10586 

Path:   C:\tools\cygwin\bin
C:\tools\cygwin\foo

Output from C:\tools\cygwin\bin\id.exe
UID: 1049799(riedel)
GID: 1049089(Domain Users)
1049089(Domain Users)
545(Users)
4(INTERACTIVE)
66049(CONSOLE LOGON)
11(Authenticated Users)
15(This Organization)
66048(LOCAL)
1052316(raum)
1052312(Domain MpexRead)
1052313(Domain MpexWrite)
1052311(Domain Mitarbeiter)
70145(Authentication authority asserted identity)
401408(Medium Mandatory Level)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = 'riedel'
PWD = '/home/riedel.TECO'
HOME = '/home/riedel.TECO'

USERDOMAIN_ROAMINGPROFILE = 'TECO'
HOMEPATH = '\Users\riedel'
APPDATA = 'C:\Users\riedel.TECO\AppData\Roaming'
ProgramW6432 = 'C:\Program Files'
HOSTNAME = 'tecolaptop-till'
SHELL = '/bin/bash'
TERM = 'xterm-256color'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 61 Stepping 4, GenuineIntel'
JD2_HOME = 'C:\Users\riedel.TECO\AppData\Local\JDownloader 2.0'
HISTSIZE = '1'
PROFILEREAD = 'true'
WINDIR = 'C:\WINDOWS'
TVT = 'C:\Program Files (x86)\Lenovo'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/cygdrive/c/WINDOWS/system32'
ORIGINAL_PATH = 
'/cygdrive/c/tools/ruby23/bin:/cygdrive/c/tools/ruby22/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program
 Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common 
Files/Intel/WirelessCommon:/cygdrive/c/Program 
Files/Java/jdk1.8.0_45/bin:/cygdrive/c/Program 
Files/Calibre2:/cygdrive/c/Program 
Files/Java/jre1.8.0_45/bin:/cygdrive/c/Program Files 
(x86)/vim/vim74:/cygdrive/c/tools/python2:/cygdrive/c/Program 
Files/Java/jdk1.8.0_51/bin:/cygdrive/c/Windows/idmu/common:/cygdrive/c/Program 
Files/Java/jre7/bin:/cygdrive/c/Program 
Files/Java/jre1.8.0_51/bin:/cygdrive/c/Program 
Files/Java/jre1.8.0_600.27/bin:/cygdrive/c/Program 
Files/Java/jre1.8.0_65/bin:/cygdrive/c/Program 
Files/Java/jre1.8.0_66/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
 Files (x86)/Brackets/command:/cygdrive/c/Program 
Files/Java/jre1.8.0_71/bin:/cygdrive/c/Program 
Files/Java/jre1.8.0_73/bin:/cygdrive/c/Program 
Files/Java/jdk1.8.0_77/bin:/cygdrive/c/Program 
Files/Java/jdk1.7.0_79/bin:/cygdrive/c/HashiCorp/Vagrant/bin:/cygdrive/c/Program
 Files/Java/jdk1.8.0_92/bin:/cygdrive/c/Program 
Files/nodejs:/cygdrive/c/Program Files 
(x86)/Skype/Phone:/cygdrive/c/tools/ghc/ghc-7.10.3/bin:/cygdrive/c/Program 
Files/Boot2Docker for 
Windows:/:/cygdrive/c/PROGRA~2/Oracle/VirtualBox:/home/riedel.TECO/AppData/Local/atom/bin:/cygdrive/c/Program
 Files/gs/gs9.16/bin:/cygdrive/c/Program 
Files/gs/gs9.16/lib:/cygdrive/c/ProgramData/chocolatey/bin/SaxonHE/bin:/cygdrive/c/tools/cmder:/home/riedel.TECO/AppData/Local/Pandoc:/cygdrive/c/Program
 Files (x86)/Microsoft VS Code/bin:/cygdrive/c/Program 
Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common 
Files/Intel/WirelessCommon:/cygdrive/c/tools/ChocolateyPackageUpdater:/home/riedel.TECO/AppData/Roaming/npm:/home/riedel.TECO/AppData/Roaming/local/bin'
USERDOMAIN = 'TECO'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\ProgramData'
ANT_HOME = 'C:\ProgramData\chocolatey\lib\ant\apache-ant-1.9.6'
HISTFILESIZ