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

Re: When debconf is no longer required for a package...



On Sat, 24 Apr 2010 18:22:57 -0700
Russ Allbery <rra@debian.org> wrote:

> Neil Williams <codehelp@debian.org> writes:
> 
> > Is this just a corner case that lintian doesn't catch? (Is it
> > really so rare that packages stop using debconf at some future
> > version?) It's roughly equivalent to a package moving from a
> > database that needed dbconfig-common support to some other backend
> > (maybe a binary or simple file based one) that didn't need any
> > debconf configuration. I'd expect this to have happened before.
> 
> I have no strong opinions about the rest of your message, but so far
> as I know, no one has ever mentioned this case to Lintian before and
> the Lintian analysis code just doesn't anticipate it.

(I was far too verbose, I know. Should have waited until the morning,
too tired.)

Turns out that with a few tweaks to the postinst proposed by Joey,
lintian is happy, including with the ucf handling which was caught
initially.

Thanks, Joey.

postinst:
#/bin/sh

set -e

if dpkg --compare-versions "$2" lt-nl "2.2.0"; then
	if [ -e /usr/share/debconf/confmodule ]; then
		# Source debconf library.
		. /usr/share/debconf/confmodule
		# Remove my changes to the db.
		db_purge
	fi
	# Remove the configuration files
	if which ucf > /dev/null; then
		ucf --purge /etc/apt/sources.list.d/emdebian.sources.list
		ucf --purge /etc/emsource.conf
	fi
	if which ucfr > /dev/null; then
		ucfr --purge emdebian-tools /etc/apt/sources.list.d/emdebian.sources.list
		ucfr --purge emdebian-tools /etc/emsource.conf
	fi
	rm -f /etc/apt/sources.list.d/emdebian.sources.list
	rm -f /etc/apt/sources.list.d/emdebian.sources.list.ucf-old
	rm -f /etc/apt/sources.list.d/emdebian.sources.list.ucf-new
	rm -f /etc/apt/sources.list.d/emdebian.sources.list.ucf-dist
	rm -f /etc/emsource.conf
	rm -f /etc/emsource.conf.ucf-old
	rm -f /etc/emsource.conf.ucf-new
	rm -f /etc/emsource.conf.ucf-dist
fi


-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgptfTkmdgwW4.pgp
Description: PGP signature


Reply to: