Carsten Hey | 30 Aug 15:20

Bug#497175: apticron: please check whether /var/lib/aptitude/pkgstates exists before grepping in it or redirect stderr to /dev/null

Package: apticron
Severity: grave
Version: 1.1.22
Tags: patch

The following line causes a mail to be send every night when
/var/lib/aptitude/pkgstates does not exist:

  APTITUDE_HOLDS=`grep "^State: 2" -B 2 /var/lib/aptitude/pkgstates |grep "^Package: .*$" |cut -d" " -f 2`

A possible fix is to change the line into:

  APTITUDE_HOLDS=`grep "^State: 2" -B 2 /var/lib/aptitude/pkgstates |grep "^Package: .*$" |cut -d" " -f
2` 2>/dev/null

According to the changelog this bug was introduced in version 1.1.22.

Regards,
Carsten


Gmane