In replacing this construct: insinto /usr/share/man/man5 ; doins ${FILESDIR}/foo.5.gz with doman ${FILESDIR}/foo.5.gz I note that it installed the man page in /usr/share/man/mang/ Perhaps doman can be just a tad smarter. I hope to look into this when I can, but here is a report anyway. Paul
Ximian bin # sh -x script + x=nslookup.8.gz + md=gz + mandir=mang + echo mang mang Ximian bin # pico script Ximian bin # sh -x script + x=nslookup.8.gz + md=8.gz + mandir=man8 + echo man8 man8 Ximian bin # more script x="nslookup.8.gz" md=${x#*.} mandir=man${md:0:1} echo $mandir md=${x#*.} in /usr/lib/portage/doman solves this problem. btw, we need a check <snip> md=${x##*.} [ -z `echo ${md:0:1} | sed -n '/[0-9]/p'` ] && echo "wrong file name" && exit 1 mandir=man${md:0:1} if [ -e ${x} ] </snip>
typo. 'md=${x##*.}' in the <snip> should have been 'md=${x#*.}' btw, I think manpages are not supposed to be already gzipped. If not we can implement a check and so on ..
Will be fixed in 2.0.28.
New code for 'doman' @ http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-src/portage/bin/doman?rev=1.4&content-type=text/vnd.viewcvs-markup will not work with manpages such as 'issue.net.5' Ximian bin # more script_old basename $0 x="issue.net.5" md=${x#*.} suf=${x##*.} mandir=man${md:0:1} echo $mandir Ximian bin # sh -x script_old + basename script_old script_old + x=issue.net.5 + md=net.5 + suf=5 + mandir=mann + echo mann mann I've wrote this: Ximian bin # more script basename $0 x="issue.net.5" os_1="-2" os_2="-4" os_3="-1" md=${x:os_1} if [ $md == gz ]; then suf="gz" md=${x:os_2:1} else md=${x:os_3} fi mandir=man${md} if [ "$suf" != "gz" ]; then gzip -f -9 ./${mandir}/${x##*/} fi Ximian bin # sh -x script + basename script script + x=issue.net.5 + os_1=-2 + os_2=-4 + os_3=-1 + md=.5 + '[' .5 == gz ']' + md=5 + mandir=man5 + '[' '' '!=' gz ']' + gzip -f -9 ./man5/issue.net.5 gzip: ./man5/issue.net.5: No such file or directory
Should be fixed in Portage 2.0.30 for handling both "issue.5", "issue.5.gz" "issue.foo.5" and "issue.foo.5.gz". Assigning to trance for QA verification.
*** Bug 6770 has been marked as a duplicate of this bug. ***
I think this bug can be safely closed .. The fixes are already in portage.