Package: debianutils
Version: 2.17
Severity: normal

Running:

  savelog -t -q -j -d -c 99 yip

causes an error like this to be printed:

  bzip2: Input file yip.20061001030006.bz2 already has .bz2 suffix.

if there are previously compressed and rotated versions of the file 
already there.

The problem is at about line 250 of /usr/bin/savelog:

        # compress the old uncompressed log if needed
        if test -n "$datum" && test -n "$COMPRESS"; then
                $COMPRESS -- "$newname".[0-9]*[0-9]
        fi

This code is trying to compress old dated files but also catches files 
ending in "[0-9]*.bz2".

Possible solutions, from hackiest to best, include:

* Pass -q to $COMPRESS.  This will stop the warning appearing.

  However, if the compression scheme is changed from gzip to bzip2 
  (or vice-versa) between uses of savelog, this will still allow gzipped 
  files to be recompressed with bzip2. 

* Only try to compress files ending in 2 consecutive digits.  This will 
  fix the current problem but will no doubt fail in the future.

* Since the value of $DATUM will always contain 14 digits then only 
  compress files ending in 14 digits.  I'm not sure this is locale-safe.

* Generate a list of files to compress, removing any that end in $DOT_Z.
  This is pretty good but still allows recompression of files if the 
  compression scheme is changed.

* As above but filter out anything that looks like a compressed 
  filename.

Thanks...

peace & happiness,
martin


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.10
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages debianutils depends on:
ii  coreutils                    5.97-5      The GNU core utilities
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  mktemp                       1.5-2       Makes unique filenames for tempora

debianutils recommends no packages.

-- no debconf information


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

Reply via email to