Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2011 21:03:41 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        Xin LI <delphij@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r222211 - head/usr.bin/gzip
Message-ID:  <86vcwy67bm.fsf@gmail.com>
References:  <201105230940.p4N9eLQ1014007__26701.9700528637$1306143644$gmane$org@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Xin LI <delphij@FreeBSD.org> writes:

> Author: delphij
> Date: Mon May 23 09:40:21 2011
> New Revision: 222211
> URL: http://svn.freebsd.org/changeset/base/222211
>
> Log:
>   Match symbolic link handling behavior with GNU gzip, bzip2 and xz:

After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat.

  $ zcat TIFFfree.3tiff.gz
  zcat: TIFFfree.3tiff.gz is not a regular file
  Exit 1

>   When we are operating on a symbolic link pointing to an existing
>   file, bail out by default, but go ahead if -f is specified.
>
>   Submitted by:	arundel
>   MFC after:	2 weeks

At least our man(1) relies on foocat, e.g.

  $ man -d TIFFfree # from graphics/tiff
  -- Using architecture: amd64:amd64
  -- Using pager: less
  -- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l
  -- Searching PATH for man directories
  --   Adding /home/luser/.bin/man to manpath
  --   Adding /usr/local/man to manpath
  --   Adding /usr/share/man to manpath
  -- Adding default manpath entries
  --   Adding /usr/share/openssl/man to manpath
  -- Parsing config file: /etc/man.conf
  -- Using manual path: /home/luser/.bin/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man
  -- Using locale paths: en_US.UTF-8:en.UTF-8:.
  -- Searching for TIFFfree
  --     Found manpage /usr/local/man/man3/TIFFfree.3tiff.gz
  --     Skipping catpage: not found or old
  zcat: /usr/local/man/man3/TIFFfree.3tiff.gz is not a regular file
  -- Command: /usr/bin/zcat /usr/local/man/man3/TIFFfree.3tiff.gz | tbl | groff -S -P-c -Wall -mtty-char -man -Tascii | /usr/bin/col | less

and uses `-f' flag only when compression is not known/not compressed

  setup_cattool() {
          case "$1" in
          *.bz)	cattool='/usr/bin/bzcat' ;;
          *.bz2)	cattool='/usr/bin/bzcat' ;;
          *.gz)	cattool='/usr/bin/zcat' ;;
          *.lzma)	cattool='/usr/bin/lzcat' ;;
          *.xz)	cattool='/usr/bin/xzcat' ;;
          *)	cattool='/usr/bin/zcat -f' ;;
          esac
  }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86vcwy67bm.fsf>