[cwctl] on upgrade, clear instance_md5_version cache
The generate-static-datadir depends on a correct
config.instance_md5_version(), and we just invalidated it by
upgrading the instance.
--- a/cubicweb/cwctl.py Tue Dec 15 08:35:13 2015 +0100
+++ b/cubicweb/cwctl.py Thu Oct 22 16:58:12 2015 +0200
@@ -41,6 +41,7 @@
from logilab.common.clcommands import CommandLine
from logilab.common.shellutils import ASK
from logilab.common.configuration import merge_options
+from logilab.common.decorators import clear_cache
from cubicweb import ConfigurationError, ExecutionError, BadCommandUsage
from cubicweb.cwconfig import CubicWebConfiguration as cwcfg, CWDEV, CONFIGURATIONS
@@ -749,6 +750,7 @@
with mih.cnx:
with mih.cnx.security_enabled(False, False):
mih.migrate(vcconf, reversed(toupgrade), self.config)
+ clear_cache(config, 'instance_md5_version')
else:
print('-> no data migration needed for instance %s.' % appid)
# rewrite main configuration file