Package: po4a
Version: 0.26-1
Severity: wishlist
Tags: patch

Hi,

po4aman-display-po fails if posix manpages are installed. For example :


fff @ ~/debian/pkg-manpages-fr-extra/trunk/coreutils/po4a/po
% po4aman-display-po -m ls -p fr.po
Can't find the master man page ls
Looking for manpage ls
Error: Too many possible manpages: /usr/share/man/man1/ls.1.gz
/usr/share/man/man1/ls.1posix.gz, you must specify the manpage or the section

I join a patch which correct this (with a dirty regexp...).

Thanks

Florentin Duneau
? po4aman-display-po.diff
Index: scripts/po4aman-display-po
===================================================================
RCS file: /cvsroot/po4a/po4a/scripts/po4aman-display-po,v
retrieving revision 1.12
diff -u -r1.12 po4aman-display-po
--- scripts/po4aman-display-po  17 Jul 2006 20:56:15 -0000      1.12
+++ scripts/po4aman-display-po  5 Aug 2006 12:03:42 -0000
@@ -64,7 +64,7 @@
   man="$2"
   echo -n "Looking for manpage $file"
   [ -n "$section" ] && echo " in section $section" || echo ""
-  MAN_NUMBER=`man --all --where --locale=C $section "$man" 2> /dev/null | wc 
-l`
+  MAN_NUMBER=$(man --all --where --locale=C $section "$man" | grep -v 
"[0-9]posix" 2> /dev/null | wc -l)
 
   if [ "$MAN_NUMBER" = "0" ]
   then
@@ -72,7 +72,7 @@
   elif [ "$MAN_NUMBER" != "1" ]; then
     error "Too many possible manpages: $(man -aw -L C $section "$man"), you 
must specify the manpage or the section"
   else
-    MASTER=`man --where --locale=C "$section" "$man"`
+    MASTER=$(man --where --locale=C "$section" "$man" | grep -v "[0-9]posix")
   fi
 
   return 0

Reply via email to