[Bug 1490071] Re: MariaDB writes to /var/lib/mysql after crossgrade, preventing users from reverting to MySQL
Otto Kekäläinen
1490071 at bugs.launchpad.net
Tue Sep 1 13:03:47 UTC 2015
Robie, sorry but you've understood this all wrong. I hope to clarify the
status now.
The lines responsible for this downgrade prevention feature are these:
# Safe the user from stupidities.
show_downgrade_warning=0
for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do
found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'`
if dpkg --compare-versions "$this_version" '<<' "$found_version"; then
show_downgrade_warning=1
break;
fi
done
if [ "$show_downgrade_warning" = 1 ]; then
db_fset mysql-server-$this_version/really_downgrade seen false || true
db_input medium mysql-server-$this_version/really_downgrade || true
db_go
db_get mysql-server-$this_version/really_downgrade || true
if [ "$RET" = "true" ]; then
rm -f $DATADIR/debian-*.flag
touch $DATADIR/debian-$this_version.flag
else
echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2
echo "If are sure you want to downgrade to $this_version, remove the file" 1>&2
echo "$DATADIR/debian-*.flag and try installing again." 1>&2
db_stop
exit 1
fi
fi
See source at http://anonscm.debian.org/cgit/pkg-
mysql/mysql-5.5.git/tree/debian/mysql-server-5.5.preinst#n67
I am on purpose linking to the mysql-5.5 source to alleviate that this
downgrade flag thing is old legacy that has been around for ages. This
same code is in MySQL 5.6 packaging. It is completely unfair to blaim
MariaDB for any of this.
When you wanted to implement the config file decoupling last year I
multiple times asked you to "prove" your point by referencing to actual
bug reports where any real users where suffering from something that
config file decoupling would be the solution. I don't recall that you
managed to do that. Even then all the examples you referenced to were
really bugs regarding legacy packaging and for example this flag file
thing.
I tried to prioritize fixing this flag time on mailing list and irc many
times. For example:
I'd also like us to review the package install/remove/purge
pre/post-scripts, as they are the same across all new versions of all
variants and while doing MariaDB I stumbled across multiple issues,
which some of I've fixed (and you should copy those commits over to
the mysql-5.6 git tree), and some of them are still unresolved and we
need to fix them together. I think this is a high priority since many
of the install/upgrade/remove errors people report bugs about are due
the stupid legacy stuff in these scripts, and due to design issues
like the /var/lib/mysql/*.flag system.
(from http://lists.alioth.debian.org/pipermail/pkg-mysql-
maint/2014-November/007237.html)
Please change the title of the bug to something more appropriate and
please participate in the discussion at pkg-mysql-maint mailing list
about how to redesign this flag thing:
http://lists.alioth.debian.org/pipermail/pkg-mysql-
maint/2015-September/008128.html
** Package changed: mariadb-10.0 (Ubuntu) => mysql-5.6 (Ubuntu)
** Summary changed:
- MariaDB writes to /var/lib/mysql after crossgrade, preventing users from reverting to MySQL
+ MySQL 5.5/5.6 detects /var/lib/mysql/*.flag file and aborts installation
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1490071
Title:
MySQL 5.5/5.6 detects /var/lib/mysql/*.flag file and aborts
installation
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1490071/+subscriptions
More information about the Ubuntu-server-bugs
mailing list