Hi, Adam D. Barratt wrote:
> This bug report seems to have branched in to a couple of issues relating > to dash's use of diversions and its use as /bin/sh, rather than the > original issue of whether the preinst should be moved to something that > doesn't rely on /bin/sh working; some of these should probably be moved > elsewhere: Thanks, this is a good summary. > * handling of local diversions > - already #538822 > - as such diversions must have been manually added, for squeeze this may > be a documented upgrade issue (in the release notes) This was advertised by bash as the way to use dash as /bin/sh for a long time. An automagic upgrade is a lovely thing, but for a few reasons this seems less important than the other issues, especially: - it's a noisy failure, not silent breakage. - if those diversions were added in order to set dash as /bin/sh, it's easy to repair. > * extending the handling of /bin/sh to include more shells than bash and dash > - definitely post-squeeze material That's probably the right choice, since only one person seems to be working on it. :( This is a serious regression from lenny. I wish it would be fixed soon in squeeze-backports at least. The main component (an upgrade path in bash to remove /bin/sh from its files list without disturbing the configured shell) has been written and seems to work fine. See Bug#602483. I have some cosmetic improvements saved up for that patch but I can't tell if there's any interest... To be clear, anyone can help out with this; it does not have to be a release manager or bash maintainer. A nice first step to work towards would be a collection of updated packages in experimental, so we can have people test it. > * the preinst isn't idempotent > - from a few quick tests, it looks like this could be resolved by changing > the execution order to "cp, ln, divert" rather than "divert, cp, ln"; I > may have missed something, however Technically one would need # nothing except dash prerm seems to care about the .distrib # file, so this is relatively safe. cp -dp $dfile $distrib # ln -sf is not idempotent, though ln -s to temporary + mv is. ln -sf $ltarget $tmpfile mv -f $tmpfile $dfile dpkg-divert --package dash --divert $distrib --add $dfile The window when this can happen is very short, and the failure modes are not so bad (except if ln -sf is interrupted in the middle. That one would mean no /bin/sh). > * make it a /bin/bash script instead > > This is a "no brainer" change in terms of ensuring correctness; no changes > are required to the remainder of the script. It does mean that dash can't > be reinstalled in a situation where the installation of bash is damaged. That is not a big problem. dash can't be reinstalled in a situation where the installation of libc is damaged, either. In practice what you would do is, from an open shell, 1. Reinstall bash. 2. Reinstall dash. and all is well again. > * make it a compiled C program > > This means that dash can be reinstalled in situations where both bash and > dash are damaged or otherwise unavailable and means dash doesn't require > bash. Both of these are certainly reasonable goals, but this approach is > a more fundamental change and may be more difficult to test, so the > question is whether the potential gains are worth the risk at this stage > of the release process. I think this could be done safely, but the effect on maintainability just doesn't seem worth it. > Regards, Thanks. Jonathan -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org