[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#539366: apt: Daily cron job exits with 'integer expression expected'



Package: apt
Version: 0.7.22
Severity: normal

Today the daily apt cron job exited with

   /etc/cron.daily/apt: line 310: [: : integer expression expected

This is because $VERBOSE in this line in debug_echo

   310     if [ "$VERBOSE" -ge 1 ]; then

expands to the empty string. I believe this is caused a few lines down by
this piece of code:

   322 # Set VERBOSE mode from  apt-config (or inherit from environment)
   323 eval $(apt-config shell VERBOSE APT::Periodic::Verbose)
   324 debug_echo "verbose level $VERBOSE"
   325 if [ -z "$VERBOSE" ]; then
   326     VERBOSE="0"
   327 fi

I think the test for the empty string in lines 325-327 and the printing of
the resulting value with debug_echo on line 324 should be swapped.


Arjan


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.27.21 (PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt depends on:
ii  debian-archive-keyring        2009.01.31 GnuPG archive keys of the Debian a
ii  libc6                         2.9-23     GNU C Library: Shared libraries
ii  libgcc1                       1:4.4.1-1  GCC support library
ii  libstdc++6                    4.4.1-1    The GNU Standard C++ Library v3

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc                       <none>     (no description available)
pn  aptitude | synaptic | gnome-a <none>     (no description available)
ii  bzip2                         1.0.5-3    high-quality block-sorting file co
ii  dpkg-dev                      1.15.3.1   Debian package development tools
ii  lzma                          4.43-14    Compression method of 7z format in
ii  python-apt                    0.7.11.1   Python interface to libapt-pkg

-- no debconf information



Reply to: