delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/16/20:14:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49BEF96D.8060809@cwilson.fastmail.fm>
Date: Mon, 16 Mar 2009 21:14:21 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Not a cygport problem [Was: Re: Problem with 575 man pages -- cygport problem?]
References: <49BDE52A DOT 80100 AT veritech DOT com> <20090316131743 DOT GC23977 AT ednor DOT casa DOT cgf DOT cx> <49BE6A68 DOT 9040705 AT veritech DOT com>
In-Reply-To: <49BE6A68.9040705@veritech.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

It took a while to track this down, but the issue is in ncurses'
internal mechanisms for installing man pages. Basically, it's too clever
for its own good.

Simple packages do this:
  I have man page. I put man page in mandir.  The end.
   /usr/share/man/man1/foo.1
Sometimes, they might have aliases implemented via symlinks, so that
'man bar' gets you the same text as 'man foo':

   /usr/share/man/man1/foo.1
   /usr/share/man/man1/bar.1 -> foo.1

cygport comes along and looks for symlinks in the mandir, figures out
what the target is, removes the symlink and replaces it with a file with
content:
   .so foo.1

Then, cygport gzips all the files, leaving

   /usr/share/man/man1/foo.1.gz
   /usr/share/man/man1/bar.1.gz (not a symlink)

This works fine.  ncurses tries to do something similar, except it
parses the man pages themselves for all entries in the NAME section, and
creates the stub files (.so target) for each of them manually. AND
optionally gzips, compresses, nroffs, and tbls them, installing each to
different hierarchies under /usr/share/man, depending on 27 different
configure arguments.

It got a little confused.

(What's odd is I didn't specify any of those 27 configure arguments; I
just wanted it to do the same thing I always do: --with-manpage-symlinks
(e.g. don't monkey around with .so files; just use symlinks [and I'll
let cygport do the heavy lifting]).

This worked in 5.5...but not, apparently, 5.7.

It will be a while until I get around to respining ncurses AGAIN, so in
the meantime, this should fix it:

#!/bin/sh
find /usr/share/man -type f -name "*.gz" |\
xargs file | grep 'ASCII troff' | awk -F: '{print $1}' |\
while read F ; do
  B=${F%%.gz}
  mv ${F} ${B}
  gzip ${B}
done

--
Chuck


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019