Re: Bug#368383: dumb "manual page for..." NAME section on many man pages

2006-06-01 Thread A. Costa
On Wed, 24 May 2006 02:17:28, Brendan O'Dea <[EMAIL PROTECTED]> said:

> Feel free to raise new bugs on other packages.

The following pair of one-liners might be of use to somebody...

% apropos "manual page for"
cddb-slave2-properties (1) - manual page for Gnome 
cddb-slave2-properties 2.0.0
cdxa2mpeg (1)- manual page for cdxa2mpeg 0.7.23
ddrescue (1) - manual page for ddrescue version 1.2
eog-collection-view (1) - manual page for Gnome eog-collection-view
fribidi (1)  - manual page for fribidi 0.10.5
gnome-cd (1) - manual page for Gnome gnome-cd 2.1.0
gnome-sound-recorder (1) - manual page for Gnome grecord 2.1.0
gnome-volume-control (1) - manual page for Gnome gnome-volume-control 
2.1.0
gstreamer-properties (1) - manual page for Gnome gstreamer-properties 
2.2.1.1
gv (1)   - manual page for gv 3.6.1
orange (1)   - manual page for orange 0.8.9
recode (1)   - manual page for recode 3.6
speexdec (1) - manual page for speexdec version 1.1
speexenc (1) - manual page for speexenc version 1.1
vcd-info (1) - manual page for vcd-info 0.7.23
vcdimager (1)- manual page for vcdimager 0.7.23
vcdxbuild (1)- manual page for vcdxbuild 0.7.23
vcdxgen (1)  - manual page for vcdxgen 0.7.23
vcdxminfo (1)- manual page for vcdxminfo 0.7.23
vcdxrip (1)  - manual page for vcdxrip 0.7.23
vumeter (1)  - manual page for Gnome Volume Meter 2.1.0
xchat (1)- manual page for xchat 2.0.10

...which files and packages?

% apropos "manual page for" | while read a b ; do set `whereis $a` ; 
eval echo \$$#; done | xargs dlocate | sort
eog: /usr/share/man/man1/eog-collection-view.1.gz
gddrescue: /usr/share/man/man1/ddrescue.1.gz
gnome-media: /usr/share/man/man1/gnome-cd.1.gz
gnome-media: /usr/share/man/man1/gnome-sound-recorder.1.gz
gnome-media: /usr/share/man/man1/gnome-volume-control.1.gz
gnome-media: /usr/share/man/man1/gstreamer-properties.1.gz
gnome-media: /usr/share/man/man1/vumeter.1.gz
gv: /usr/share/man/man1/gv.1.gz
libfribidi0: /usr/share/man/man1/fribidi.1.gz
orange: /usr/share/man/man1/orange.1.gz
recode: /usr/share/man/man1/recode.1.gz
speex: /usr/share/man/man1/speexdec.1.gz
speex: /usr/share/man/man1/speexenc.1.gz
vcdimager: /usr/share/man/man1/cdxa2mpeg.1.gz
vcdimager: /usr/share/man/man1/vcd-info.1.gz
vcdimager: /usr/share/man/man1/vcdimager.1.gz
vcdimager: /usr/share/man/man1/vcdxbuild.1.gz
vcdimager: /usr/share/man/man1/vcdxgen.1.gz
vcdimager: /usr/share/man/man1/vcdxminfo.1.gz
vcdimager: /usr/share/man/man1/vcdxrip.1.gz
xchat: /usr/share/man/man1/xchat.1.gz

Of course my system doesn't have every package in Debian installed:

% dglob | wc -l 
2433

Some developer with access to a whole Debian mirror might use a similar
search of its '.deb' archives to produce a complete list.  Alas, I
don't have an equivalent one-liner for '.deb' files.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#368383: dumb "manual page for..." NAME section on many man pages

2006-06-01 Thread A. Costa
This mostly works for '.deb' files.

# print the archive name and the 'whatis' line of any man pages in it.
dope() { D=$1 ; dpkg-deb -c $D | grep '^-.*man' | while read a b c d e 
f ; do echo $f ; done | while read x ; do basename $x ; done | tr . ' ' | while 
read a b c ; do L="`bash debman -f $D $b $a 2> /dev/null | grep -m 1 -A 1 
"NAME" | tail -n 1`"; [ "$L" ] && echo "$D , $a.$b:$L" ; done ; }

Example:
% dope bash_3.1-4_i386.deb 
bash_3.1-4_i386.deb , bash.1:   bash - GNU Bourne-Again SHell 
bash_3.1-4_i386.deb , bashbug.1:bashbug - report a bug in bash 
bash_3.1-4_i386.deb , clear_console.1:   clear_console - clear the 
cons ole
bash_3.1-4_i386.deb , rbash.1:   rbash - restricted bash, see 
bash(1)
bash_3.1-4_i386.deb , bash-builtins.7:   bash-builtins - bash 
built-in commands, see bash(1)

Doesn't check for hard or soft links, yet.

Change to a dir with lots of '.deb' files, and this runs slow:

 for f in *.deb ; do dope $f ; done | grep "manual page for"

HTH...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]