/etc/cron.daily/apt doesn't run apt-get update anymore

Bug #449535 reported by Lars Ljung on 2009-10-12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
apt (Ubuntu)
Michael Vogt
Michael Vogt

Bug Description

Binary package hint: apt

The call to "apt-get update" in /etc/cron.daily/apt always returns "E: The update command takes no arguments". This is caused by not escaping quotation marks properly.

ProblemType: Bug
Architecture: amd64
Date: Mon Oct 12 15:24:21 2009
DistroRelease: Ubuntu 9.10
Package: apt
 PATH=(custom, user)
ProcVersionSignature: Ubuntu 2.6.31-13.44-generic
SourcePackage: apt
Uname: Linux 2.6.31-13-generic x86_64

Lars Ljung (larslj) wrote :
Lars Ljung (larslj) wrote :
Bowmore (bowmore) wrote :

I do confirm that the missing escapes in front of the two quotation marks in the script /etc/cron.daily/apt on row 460 cause malfunction. Adding those escapes makes the script work again and notifying the user of any updates.

Changed in apt (Ubuntu):
status: New → Confirmed
Kees Cook (kees) wrote :

As far as I can tell, the "if eval ..." lines should not include "eval"...

Changed in apt (Ubuntu Karmic):
importance: Undecided → Critical
milestone: none → ubuntu-9.10
Kees Cook (kees) wrote :

Log of failure with "if eval ..."

Kees Cook (kees) wrote :

Log of removing the "eval" from the "if" lines (works correctly).

Kees Cook (kees) wrote :

This seems to fix both the lack of VERBOSE-override and the misplaced "eval"s.

Changed in apt (Ubuntu Karmic):
assignee: nobody → Michael Vogt (mvo)
Kees Cook (kees) wrote :

This was tested as root via:
rm /var/lib/apt/periodic/update-stamp; VERBOSE=3 /etc/cron.daily/apt >/tmp/logfile 2>&1

after fixing the incorrect VERBOSE environment handling in the script.

Kees Cook (kees) wrote :

21:04 < slangasek> kees: yes; the eval isn't the cause of that error
21:04 < slangasek> the 'update' needs to be moved to the end of the commandline, after the -o
21:10 < slangasek> so, ok, the eval isn't broken, just CRAAAAAZZY

In this case, I think the originally proposed patch is better.

Kees Cook (kees) on 2009-10-14
Changed in apt (Ubuntu Karmic):
status: Confirmed → Fix Committed
Michael Vogt (mvo) wrote :

Many thanks for the patch! I uploaded it now, it currently in the approval queue.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt -

apt ( karmic; urgency=low

  [ Michael Vogt ]
  * debian/control:
    - fix Vcr-Bzr header

  [ Kees Cook ]
  * debian/apt.cron.daily:
    - fix quotes for use with "eval", thanks to Lars Ljung (LP: #449535).

 -- Michael Vogt <email address hidden> Thu, 15 Oct 2009 19:05:19 +0200

Changed in apt (Ubuntu Karmic):
status: Fix Committed → Fix Released
Steve Langasek (vorlon) wrote :

Documented at <https://wiki.ubuntu.com/KarmicKoala/ReleaseNotes#Upgrade%20from%20beta%20must%20be%20triggered%20manually>:

A bug in the apt package included in the Ubuntu 9.10 Beta prevents automatic notification of available package updates. Users who have installed or upgraded to Ubuntu 9.10 prior to the Release Candidate should ensure that updates are being made available by running update-manager manually, clicking Check, and installing the presented updates. (449535)

Changed in ubuntu-release-notes:
importance: Undecided → High
status: New → Fix Released
Tomáš Heger (theger) wrote :

So users who installed Beta should not except any fix of this? They have to run update-manager manually every time they want to check if updates are available? Or will it be repaired?

Brian Murray (brian-murray) wrote :

geckon - no you only need to run update-manager manually one time and then you will have the fix installed.

Tomáš Heger (theger) wrote :

I use "aptitude update && aptitude safe-upgrade" regularly, so I should have up-to-date system, but I didn't noticed automatic run of update-manager. Maybe I check updates too often :-D

Bowmore (bowmore) wrote :

A notification is given once a week as default.

Run the command,
$ gconf-editor /apps/update-notifier/regular_auto_launch_interval
and you can change that down to once a day.

On Thu, Oct 29, 2009 at 04:28:04PM -0000, Brian Murray wrote:
> geckon - no you only need to run update-manager manually one time and
> then you will have the fix installed.

More precisely, you have to run update-manager once to grab the list of
updated packages, *and then install them* in order to get the fixed version
of this script.

Running update-manager and closing it again without checking for updates
won't do the trick ;)

Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

cferaci (cferaci) on 2010-01-01
Changed in ubuntu-release-notes:
status: Fix Released → New
Steve Langasek (vorlon) wrote :

Please don't change bug status without explanation.

Changed in ubuntu-release-notes:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers