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

Re: Patch for bash



On Fri, Aug 27, 1999 at 06:10:20PM -0400, Michael Stone wrote:
> On Fri, Aug 27, 1999 at 11:28:30PM +0200, Raphael Hertzog wrote:
> > Which is also not so logical since in the preinst bash is not yet unpacked
> > and there may be no /bin/bash ... it may be installed in the
> > preinst when the package is upgraded ($1 = upgrade) only (in which
> > case the link should already exist, but a little check should not hurt).
> Hmm. Can someone more familiar with dpkg clear up what's going to happen
> here? 

From the packaging-manual:

(old version=2.02.1-1.6, new=-1.7, and assuming no failures)

unpacking: (section 6.3)

1.1	old.bash.prerm upgrade 2.02.1-1.7
3.1	new.bash.preinst upgrade 2.02-1-1.6
4.	unpack new files
5.	old.bash.postrm upgrade 2.02.1-1.7
[if we make it this far, dpkg won't undo any of the above changes]
6.	remove files that aren't in new bash (/bin/sh link)
7.	new file list replaces old
8.	new maintainer scripts replace old
12.	bash recorded as unpacked

configuring: (section 6.4)

	update conffiles
	new.bash.postinst configure 2.02.1-1.6

Note that the first maintainer script after "remove /bin/sh" is the
postinst -- adding the link in the preinst doesn't do us any good on
upgrades.

For new installs, the base.tgz should take care of having a correctly
configured bash including a /bin/sh symlink, so when the preinst is run
there should already be a /bin/sh symlink that dpkg doesn't know about
to mess with.

Furthermore, Essential packages are always immediately configured by Apt,
so we don't have an issue there either.

Note also that many packages have an implicit pre-dependency or dependency
on bash (by way of bash being essential, and other packages using /bin/sh
or /bin/bash maintainer scripts), so this is the only particularly
feasible behaviour.

> Creating
> the link should always be done if there isn't one, IMHO, whether this is
> a new install or an upgrade, to account for cases where bash somehow got
> removed.

Note that current behaviour is that the preinst fails if bash somehow gets
removed. (dpkg --force-remove-essential --force-depends --remove bash;
dpkg -i bash_2.02.1-1.7_i386.deb # does work with the previous patch,
however)

Does this sound satisfactory?

Cheers,
aj

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

 ``The thing is: trying to be too generic is EVIL. It's stupid, it 
        results in slower code, and it results in more bugs.''
                                        -- Linus Torvalds

Attachment: pgp6N4nNUppoe.pgp
Description: PGP signature


Reply to: