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

Re: problems in upgrade



On Tue, Jun 26, 2001 at 12:17:03PM -0400, Ben Collins wrote:
> We could always do what redhat has done, and copy the libdb.so.3 from
> the glibc 2.1.3 binaries, and use them in the libdb2 package. That means
> it will work when 2.1.3 is still installed, and before libc6 2.2.x is
> unpacked. The solution will work, since we don't need libdb.so.3
> compatibility for new archs (since they have never compiled anything
> against it).

Hrm. Maybe you could do something with diversions, to make sure the old
libdb.so.3 doesn't get rm'ed until the new libc6 is installed and the
new libdb2 is unpacked. You could add the following to both packages'
preinsts, maybe:

	if [ -e /var/lib/LIBDB2-BEING-UPGRADED ]; then
	  dpkg-divert --local --remove /lib/libdb.so.3 
	  if [ -e /lib/libdb-NEW.so.3 ]; then
	    mv /lib/libdb-NEW.so.3 /lib/libdb.so.3
	  fi
	  rm -f /var/lib/LIBDB2-BEING-UPGRADED
	elif [ upgrading for potato libc ]; then
	  dpkg-divert --divert /lib/libdb-NEW.so.3 --local /lib/libdb.so.3
	  touch /var/lib/LIBDB2-BEING-UPGRADED
	fi


Which would theoretically mean the following installs would be possible:

	...
	libc6 preinst [diversion added]
	unpack libc6 [diversion stops old libdb.so.3 from being rm'ed]
	... [old libdb2 still available, and functional]
	libdb2 preinst [diversion removed]
	unpack libdb2 [old libdb2 finally replaced with new libdb2]
	...

and

	...
	libdb2 preinst [diversion added]
	unpack libdb2 [diversion means new file goes under different name]
	... [old libdb2 still available and functional]
	libc6 preinst [diversion removed, new libdb2 replaces old libdb2]
	unpack libc6 [*]
	...

[*] You might need to add a "libdb2 Replaces: libc6" header too,
    maybe; not sure if the unpack libc6 there could end up rm'ing the
    new libdb2 thinking it was the old one.

That could maybe be made to work. Assuming the old libdb2 will work with the
new libc6.

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

``_Any_ increase in interface difficulty, in exchange for a benefit you
  do not understand, cannot perceive, or don't care about, is too much.''
                      -- John S. Novak, III (The Humblest Man on the Net)

Attachment: pgp1hdNUEc1N8.pgp
Description: PGP signature


Reply to: