trusty → xenial upgrade fails to upgrade /etc/init.d/cron

Bug #1566333 reported by Martin Pitt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
Fix Released
High
Martin Pitt
Xenial
Fix Released
High
Martin Pitt

Bug Description

Upgrading from trusty to xenial is meant to replace "/etc/init.d/cron -> /lib/init/upstart-job" with a real file /etc/init.d/cron.

This works fine in a schroot, but in a container or a VM you end up with

lrwxrwxrwx 1 root root 21 Feb 9 2013 /etc/init.d/cron -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 3049 Feb 17 18:25 /etc/init.d/cron.dpkg-new

Reproducer:

 - start trusty container or VM
 - echo 'deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse' | sudo tee /etc/apt/sources.list
 - sudo apt update
 - sudo apt-get install -y cron

Tags: upgrade xenial
Martin Pitt (pitti)
tags: added: upgrade xenial
Revision history for this message
Martin Pitt (pitti) wrote :

I did a full t→x dist-upgrade of a cloud image, and this is the only package which is affected.

Changed in cron (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
milestone: none → ubuntu-16.04
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

So the situation is that the old cron (https://launchpad.net/ubuntu/+source/cron/3.0pl1-124ubuntu2/+build/4287213/+files/cron_3.0pl1-124ubuntu2_amd64.deb) just ships the symlink in the .deb, and the new cron ships the plain file, and dpkg apparently refuses to replace a symlink with a file. This is currently not handled in the maintainer scripts at all, so we need to add some upgrade logic.

Revision history for this message
Martin Pitt (pitti) wrote :

Fix uploaded, waiting in xenial-proposed unapproved queue for ~ubuntu-release team review.

Changed in cron (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cron - 3.0pl1-128ubuntu2

---------------
cron (3.0pl1-128ubuntu2) xenial; urgency=medium

  * Add debian/cron.preinst: Handle /etc/init.d/cron symlink → real file
    transition on upgrades. (LP: #1566333)

 -- Martin Pitt <email address hidden> Tue, 05 Apr 2016 16:45:50 +0200

Changed in cron (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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