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

Bug #449535 reported by Lars Ljung
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Fix Released
High
Unassigned
apt (Ubuntu)
Fix Released
Critical
Michael Vogt
Karmic
Fix Released
Critical
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 0.7.23.1ubuntu1
ProcEnviron:
 LANGUAGE=sv_SE.UTF-8
 PATH=(custom, user)
 LANG=sv_SE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-13.44-generic
SourcePackage: apt
Uname: Linux 2.6.31-13-generic x86_64

Revision history for this message
Lars Ljung (larslj) wrote :
Revision history for this message
Lars Ljung (larslj) wrote :
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Kees Cook (kees) wrote :

Log of failure with "if eval ..."

Revision history for this message
Kees Cook (kees) wrote :

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

Revision history for this message
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)
Revision history for this message
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.

Revision history for this message
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)
Changed in apt (Ubuntu Karmic):
status: Confirmed → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.23.1ubuntu2

---------------
apt (0.7.23.1ubuntu2) 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
Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 449535] Re: /etc/cron.daily/apt doesn't run apt-get update anymore

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)
Changed in ubuntu-release-notes:
status: Fix Released → New
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.