Bug 426809 - lock check is backwards in apt cron.daily job
Summary: lock check is backwards in apt cron.daily job
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: apt
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Axel Thimm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-26 18:24 UTC by Adrian Hands
Modified: 2008-01-02 10:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-02 10:00:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adrian Hands 2007-12-26 18:24:53 UTC
Description of problem:

The script /etc/cron.daily/apt.cron from the Fedora apt package (fc8) starts off
with:

Quote:
  #!/bin/sh
  
  [ ! -f /var/lock/subsys/apt ] && exit 0
...

Meaning if the lock file does NOT exist, exit (success) without doing anything.
The lock file does not exist, so the cron job never does anything.
Isn't this backwards--i.e. shouldn't it exit if the file DOES exist (meaning apt
is already running)?



Version-Release number of selected component (if applicable):

apt-0.5.15lorg3.93-4.fc8


How reproducible:


Steps to Reproduce:

n/a
  
Actual results:

no daily upgrades

Expected results:

daily upgrades

Additional info:

Comment 1 Panu Matilainen 2008-01-02 10:00:35 UTC
This is very much intentional and not a bug: the lockfile existence is
controlled by apt "service", automatic upgrades should not be done unless
explicitly enabled:
# chkconfig apt on
# service apt start

..and you'll get your daily upgrades.


Note You need to log in before you can comment on or make changes to this bug.