Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179546 - app-text/man2html - bzip support added
Summary: app-text/man2html - bzip support added
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 198071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-23 17:00 UTC by Harvey Chapman
Modified: 2008-05-21 23:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add bzip support to man2html (man2html-bzip2.patch,885 bytes, patch)
2007-05-23 17:11 UTC, Harvey Chapman
Details | Diff
Patch for inclusion in the "files" directory of the ebuild (man2html-gentoo.patch,950 bytes, patch)
2007-08-20 12:39 UTC, Harvey Chapman
Details | Diff
Patch to modify the ebuild script to add the patch file for this bug. (man2html-1.5l-r2.ebuild.patch,500 bytes, patch)
2007-08-20 12:40 UTC, Harvey Chapman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harvey Chapman 2007-05-23 17:00:53 UTC
My gentoo install seems to use bzipped man pages, but the stable man2html 1.5l-r2 doesn't support them. This patch adds that support simply and simplifies the code that was there for determining the compression type.

Reproducible: Always

Steps to Reproduce:
1.install gentoo
2.install man2html
3.use man2html to view a manpage

Actual Results:  
Invalid Manpage
The requested file /usr/share/man/man3/printf.3.bz2 is not a valid (unformatted) man page. If the file is a formatted manpage, you could try to load the plain file. 

Expected Results:  
The manpage, formatted nicely in html.

--- man2html    2007-05-23 12:56:23.000000000 -0400
+++ man2html.save       2007-05-23 12:56:09.000000000 -0400
@@ -84,20 +84,29 @@ if [ x"$PAGE" = x ]; then
     exit 0
 fi
 
-if [ -r "$PAGE" ]
+if [ ! -r "$PAGE" ]
 then
-    case "$PAGE" in
-    *.gz)
-       zcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
-       ;;
-    *)
-       "$MAN2HTML" "$LL" "$PAGE"
-       ;;
-    esac
-elif [ -r "$PAGE".gz ]
-then
-       zcat "$PAGE".gz | "$MAN2HTML" "$LL" -D "$PAGE"
-else
-       "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+    # If PAGE is not found, see if it is compressed
+    if [ -r "$PAGE".gz ]
+    then
+        PAGE="$PAGE".gz
+    elif [ -r "$PAGE".bz2 ]
+    then
+        PAGE="$PAGE".bz2
+    else
+        "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+    fi
 fi
+
+case "$PAGE" in
+*.bz2)
+    bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+    ;;
+*.gz)
+    zcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+    ;;
+*)
+    "$MAN2HTML" "$LL" "$PAGE"
+    ;;
+esac
 exit 0
Comment 1 Harvey Chapman 2007-05-23 17:11:00 UTC
Created attachment 120104 [details, diff]
Patch to add bzip support to man2html

correct formatting
Comment 2 Harvey Chapman 2007-05-23 17:12:44 UTC
I didn't exactly match the formatting of the original file. I probably should have done that. The file uses a 4 space indent, but compresses multiples of 8 spaces with TABs <ugly>. There are three lines that would need to be fixed.

I'm attaching the new patch file.

------
Portage 2.1.2.7 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.5-r2, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 23 May 2007 11:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=athlon-xp -march=athlon-xp -pipe -O3 -ffast-math -maccumulate-outgoing-args -ftracer -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/init.d /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-mtune=athlon-xp -march=athlon-xp -pipe -O3 -ffast-math -maccumulate-outgoing-args -ftracer -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.osuosl.org/ http://mirror.datapipe.net/gentoo ftp://linux.thai.net/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="alsa apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt cups dba dcraw dri emacs ethereal fortran gd gdbm iconv imagemagick imap ipv6 isdnlog jpeg ldap libg++ maildir memlimit midi mudflap mysql ncurses nls nptl nptlonly offensive openmp pam pcre perl png postgres pppd prelude python readline reflection sasl session snmp spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts unzip usb vhosts virus-scan x86 xml xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 3 Harvey Chapman 2007-08-20 12:39:54 UTC
Created attachment 128671 [details, diff]
Patch for inclusion in the "files" directory of the ebuild

Just modified the paths at the top of the patch so it can be used with the ebuild
Comment 4 Harvey Chapman 2007-08-20 12:40:39 UTC
Created attachment 128673 [details, diff]
Patch to modify the ebuild script to add the patch file for this bug.
Comment 5 Robert Buchholz (RETIRED) gentoo-dev 2007-09-01 09:02:20 UTC
reassigning to proper alias
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-10-14 15:26:36 UTC
*** Bug 195856 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-11-04 18:11:01 UTC
*** Bug 198071 has been marked as a duplicate of this bug. ***
Comment 8 Mike Pagano gentoo-dev 2008-05-21 23:40:46 UTC
Supported in man2html-1.6f which is now in the tree.