Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Man page installation in ebuilds with doman problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Demosthenex
n00b
n00b


Joined: 11 Sep 2002
Posts: 14
Location: Houston, TX

PostPosted: Tue Oct 01, 2002 8:30 pm    Post subject: Man page installation in ebuilds with doman problem Reply with quote

Installing man pages with doman fails to work properly when the man page has more than 1 period in the file name.

For example:

conserver.cf.1 fails to install.

In fact, seems any man file with multiple extensions fails.

I've looked at the doman script, and perhaps it needs a more resilient way to detect what man[0-9] directory a file belongs in.

Perhaps something like:

man_number = `basename conserver.cf.1 .gz`
man_number = ${man_number#${man_number/%[0-9]}}

This always returns the final digit of the filename, with basename removing any .gz extension.

Comments?

Demo

Here's a quick diff on doman that seems to work for me. I don't much like calling out to basename, perhaps someone else can suggest something.

+ diff -Naru doman~ doman
--- doman~ Thu Aug 29 11:27:25 2002
+++ doman Tue Oct 1 16:40:50 2002
@@ -25,9 +25,9 @@
fi
for x in "$@"
do
- md=${x#*.}
- suf=${x##*.}
- mandir=man${md:0:1}
+ md=`basename ${x} .gz`
+ mandir=man${x#${x/%[0-9]}}
+ suf=`basename ${md} .${mandir}`
if [ -e ${x} ]
then
if [ ! -d ${D}${myloc}${myext}/man/${mandir} ]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum