Comment 4 for bug 174134

Revision history for this message
era (era) wrote :

Actually, you'll need to redirect stderr in order for the grep to do anything useful.

vnix$ apt-file -v search foobar 2>&1 >/dev/null | grep '^D: Search in'
D: Search in \/var\/cache\/apt\/apt\-file\/fi\.archive\.ubuntu\.com_ubuntu_dists_gutsy_Contents\-amd64\.gz
D: Search in \/var\/cache\/apt\/apt\-file\/fi\.archive\.ubuntu\.com_ubuntu_dists_gutsy\-updates_Contents\-amd64\.gz
D: Search in \/var\/cache\/apt\/apt\-file\/fi\.archive\.ubuntu\.com_ubuntu_dists_gutsy_Contents\-amd64\.gz
D: Search in \/var\/cache\/apt\/apt\-file\/fi\.archive\.ubuntu\.com_ubuntu_dists_gutsy\-backports_Contents\-amd64\.gz

vnix$ apt-file -v search foobar 2>&1 >/dev/null | sed -e '/^D: Search in /!d' -e 's///' -e 's/\\//g' | xargs ls -l
-rw-r--r-- 1 root root 6170 2006-04-07 16:04 /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-amd64.gz
-rw-r--r-- 1 root root 13723633 2007-10-17 06:02 /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-amd64.gz
-rw-r--r-- 1 root root 13723633 2007-10-17 06:02 /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-amd64.gz
-rw-r--r-- 1 root root 6170 2006-04-07 16:04 /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-amd64.gz

vnix$ apt-file -v search foobar 2>&1 >/dev/null | sed -e '/^D: Search in /!d' -e 's///' -e 's/\\//g' | xargs file
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-amd64.gz: gzip compressed data, from Unix, max compression
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-amd64.gz: HTML document text
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-amd64.gz: gzip compressed data, from Unix, max compression
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-amd64.gz: HTML document text

vnix$ apt-file search foobar

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-amd64.gz: not in gzip format

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-amd64.gz: not in gzip format
doc-iana: usr/share/doc/doc-iana/html/assignments/foobar-af-numbers
doc-iana: usr/share/doc/doc-iana/html/assignments/foobar-af-numbers
ecos: usr/src/ecos/packages/fs/rom/v2_0/tests/testromfs/var/foobar
ecos: usr/src/ecos/packages/fs/rom/v2_0/tests/testromfs/var/foobar
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.gif
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.gif
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.xbm
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.xbm
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.xpm
picon-usenix: usr/share/picons/usenix/edu/umd/eng/foobar/face.xpm
texlive-latex-extra: usr/share/doc/texlive-doc/latex/examdesign/foobar.tex
texlive-latex-extra: usr/share/doc/texlive-doc/latex/examdesign/foobar.tex
texlive-latex-extra: usr/share/doc/texlive-latex-extra/latex/examdesign/foobar.tex
texlive-latex-extra: usr/share/doc/texlive-latex-extra/latex/examdesign/foobar.tex
xpilot-extra: usr/share/games/xpilot-ng/maps/foobar.xp
xpilot-extra: usr/share/games/xpilot-ng/maps/foobar.xp

vnix$ uname -a
Linux tadpole 2.6.22-14-generic #1 SMP Thu Jan 31 23:33:13 UTC 2008 x86_64 GNU/Linux

vnix$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

The HTML documents in the output from "file" are due to bug 176753 and the curious set-up at the Funet mirror which redirects to a long HTML page when a file cannot be found. They are the reason for the gzip warnings in the final invocation.

I think this confirms your hypothesis. (The fact that these files are so old I think also speaks for having a periodic cron job update these files; see also bug 154180 although that's tangential.)