[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#674218: makedev: please drop obsolete preinst script

Package: makedev
Version: 2.3.1-91.1
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Hi Bdale,

A bug was recently reported in Ubuntu about a debootstrap failure, that
ultimately turned out to be related to the recent change to makedev's
preinst now being set -e.


To make a long story short, makedev's preinst was running commands which,
while they are meant to be totally safe, are unnecessary on any recent
Debian or Ubuntu system and turned out not to be safe in Ubuntu for the
specific case of debootstrapping.

Since nothing in this preinst is needed on on upgrades from any recent
release (one of the upgrade fix-ups only applies to upgrades from lenny -
oldstable - and the other only applies to upgrades from something pre-etch),
I would suggest dropping the preinst entirely as in the attached patch. 
It's unlikely that the specific bug that hit Ubuntu here will ever affect
Debian, but IMHO the fewer preinsts we have in the base system, the better.

Thanks for considering,
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/
slangasek@ubuntu.com                                     vorlon@debian.org
=== modified file 'debian/changelog'

=== removed file 'debian/preinst'
--- debian/preinst	2012-03-21 10:50:08 +0000
+++ debian/preinst	1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-#!/bin/sh -e
-# Remove a no-longer used conffile
-rm_conffile() {
-    PKGNAME="$1"
-    CONFFILE="$2"
-    if [ -e "$CONFFILE" ]; then
-        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
-        old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
-        if [ "$md5sum" != "$old_md5sum" ]; then
-            echo "Obsolete conffile $CONFFILE has been modified by you."
-            echo "Saving as $CONFFILE.dpkg-old ..."
-            mv -f "$CONFFILE" "$CONFFILE".dpkg-old
-        else
-            echo "Removing obsolete conffile $CONFFILE ..."
-            rm -f "$CONFFILE"
-        fi
-    fi
-case "$1" in
-    if dpkg --compare-versions "$2" le "2.3.1-87"; then
-	rm_conffile makedev /etc/init.d/makedev
-	update-rc.d makedev remove
-    fi
-rm -f /usr/man/man8/MAKEDEV.8 /usr/man/man8/MAKEDEV-C.8 \
-	/usr/man/man8/MAKEDEV-C.8.gz
-exit 0

Reply to: