On Mon, Jan 30, 2017 at 06:02:30PM +0000, Julian Gilbey wrote: > There is an issue with this: the postrm's in mysql-server-5.7 and > mariadb-server-10.1 do significantly more than just removing > /var/lib/mysql when purging - see my (now broken because of this!) > patches on bug#852495: they also do all of the debhelper fragments > which should only be performed on the purge of the final mysqld > instance. These clearly don't belong in the server-core packages, and > it would be strange (and perhaps wrong) to shift them there.
You reminded me that the *-core packages are supposed to provide the binaries without any "smarts". So a user might expect to use them and manage /var/lib/mysql manually. So perhaps it is indeed entirely inappropriate to put purging code in the *-core package postrm. > So how about this, just a sketch at the moment rather than a full > patch? Your sketch seems good to me, assuming that "dpkg-query --search" is permitted from maintainer scripts (I know there are some re-entrancy problems with some particular types of dpkg-related invocations?) > I *think* this covers the cases, but I'm really not certain. I'm also not certain. > a possibility that someone could be purging the old mysql-* packages > while installing a newer replacement, and I'm not sure how aptitude > would handle that one because of the somewhat complex > Breaks/Conflicts/Replaces settings in the various control files. But > a sysadmin who tries to purge an old mysql-server-providing package > simultaneously to installing a new one is potentially asking for > things to be deleted, so I'm not overly concerned about this. They > would still be asked about deleting data in this case, so there is a > safety net. (But they could conceivably lose their apparmor settings > and so on.) I wondered this too. But without thinking it through in more detail, it'd certainly be better than what we have now. Robie
signature.asc
Description: PGP signature