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

Re: Replaces: and pre/post rm



On Fri, 15 Jun 2001, Richard A Nelson wrote:

> At this point, the cleanest approach seems to (me to) be:
> 	* drop dh_installcron/dh_installlogrotate and do the work by hand
> 	  using the same name (sendmail) for both packages
> This'll mean that the packages will *NOT* have any unique conffiles,
> and the replaced package *SHOULD* simply disappear --- I'm testing
> that now.

Sigh...

Apparently, I'm running afoul of Policy 6.5:

	9.Any packages all of whose files have been overwritten during the
	installation, and which aren't required for dependencies,
	are considered to have been removed. For each such package...

Several packages depend upon sendmail (sendmail | postfix...) -
and even though sendmail-tls *REPLACES AND PROVIDES* sendmail... this
isn't working as expected.

Instead of disappearing, the /var/lib/dpkg/info/$(PACKAGE).list file is
now zero length, the .postrm remains, and the package is marked:
Package: sendmail-tls
Status: install ok config-files

So... I guess I'm forced into some kinky .postrm hack to solve the
problem...  How does this sound:

	# If postrm is called *AND* there are no files, exit quickly
	if [ ! -s `echo "$0" | sed -e 's/postrm$/list/'` ]; then
		exit 0;
		fi;

-- 
Rick Nelson
   * In anticipation of 2.10.02 release, updated to patchlevel
     +ircu2.10.01+.config6-7.config7-8.lgline3.iwho.limit.glibc.motdcache2.trace.whois1-2.config8-9.statsw.sprintf2-3.msgtree2.memleak1-2+.msgtree2-3.gline8-9.gline9-10.invite2.rbr.stats.numclients.whisper.whisper1-2.stats1-2.nokick1-2.chroot.config9-11.snomask7-8.limi+t1-3.userip1-3.userip3-4.config11-12.config12-13.umode2-3.akillsbt.who4-5.kn.kn1-2.freebsdcore2.msgtree3-5.y2k.glibc1-2.rmfunc.msgf+lags2.who5-6.nickchange2.glibc2-3.modeless3
	-- From the annoucement of ircd 2.10.01-3 for Debian GNU/Linux



Reply to: