Package: apticron Version: 1.1.51 Severity: normal Tags: patch Hello,
Changes in Bug #621730 mean the number of packages do not get reported in the subject of the email. MAILX_SUBJECT is defined before NUM_PACKAGES is known. Moving the custom subject block after the NUM_PACKAGES definition resolves the issue. Also, the custom subject example in /etc/apticron/apticron.conf should have the \$ removed from the start: # CUSTOM_SUBJECT='[apticron] \$SYSTEM: \$NUM_PACKAGES package update(s)' Regards, Dermot -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (700, 'testing'), (650, 'stable'), (550, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apticron depends on: ii apt 0.8.15.9 ii bsd-mailx [mailx] 8.1.2-0.20111106cvs-1 ii cron 3.0pl1-120 ii debconf [debconf-2.0] 1.5.41 ii dpkg 1.16.1.2 ii ucf 3.0025+nmu2 Versions of packages apticron recommends: ii apt-listchanges 2.85.8 ii iproute 20111117-1 apticron suggests no packages. -- debconf information: apticron/notification: root
*** apticron_1.1.51/usr/sbin/apticron 2011-08-29 04:06:43.000000000 +0100 --- updated/apticron 2011-12-16 18:26:45.000000000 +0000 *************** *** 74,86 **** # Source the config file [ -e /etc/apticron/apticron.conf ] && . /etc/apticron/apticron.conf - # Custom subject - if [ -n "$CUSTOM_SUBJECT" ] ; then - MAILX_SUBJECT=$(eval "echo \"${CUSTOM_SUBJECT}\"") - else - MAILX_SUBJECT="$NUM_PACKAGES $DISTRIB_ID package update(s) for $SYSTEM" - fi - if [ -z "$IPADDRESSES" ] && [ -x /sbin/ip ]; then # Set the IPv4 addresses IPADDRESSES=`(echo $( /bin/hostname --all-ip-addresses ) ; --- 74,79 ---- *************** *** 151,156 **** --- 144,156 ---- NUM_PACKAGES=`echo $PKGNAMES |wc -w` + # Custom subject + if [ -n "$CUSTOM_SUBJECT" ] ; then + MAILX_SUBJECT=$(eval "echo \"${CUSTOM_SUBJECT}\"") + else + MAILX_SUBJECT="$NUM_PACKAGES $DISTRIB_ID package update(s) for $SYSTEM" + fi + # packages already reported won't be reported again if DIFF_ONLY option is marked LAST_RUN_FILE="/var/lib/apticron/last_run" if [ "$DIFF_ONLY" = "1" ] && [ -e "$LAST_RUN_FILE" ]; then