Merge branch 'stretch-stable' into stretch-testing

This commit is contained in:
Alexandre Aubin 2019-01-17 02:16:16 +01:00
commit b475aeb4bb
2 changed files with 14 additions and 0 deletions

6
debian/changelog vendored
View file

@ -24,6 +24,12 @@ yunohost (3.4.0) testing; urgency=low
-- Alexandre Aubin <alex.aubin@mailoo.org> Thu, 20 Dec 2018 22:13:00 +0000 -- Alexandre Aubin <alex.aubin@mailoo.org> Thu, 20 Dec 2018 22:13:00 +0000
yunohost (3.3.4) stable; urgency=low
* [fix] Use --force-confold and noninteractive debian frontend during core upgrade (#614)
-- Alexandre Aubin <alex.aubin@mailoo.org> Thu, 17 Jan 2019 02:00:00 +0000
yunohost (3.3.3) stable; urgency=low yunohost (3.3.3) stable; urgency=low
* [fix] ynh_wait_dpkg_free displaying a warning despite everything being okay (#593) * [fix] ynh_wait_dpkg_free displaying a warning despite everything being okay (#593)

View file

@ -530,6 +530,11 @@ def tools_upgrade(operation_logger, auth, ignore_apps=False, ignore_packages=Fal
is_api = True if msettings.get('interface') == 'api' else False is_api = True if msettings.get('interface') == 'api' else False
if not ignore_packages: if not ignore_packages:
apt.apt_pkg.init()
apt.apt_pkg.config.set("DPkg::Options::", "--force-confdef")
apt.apt_pkg.config.set("DPkg::Options::", "--force-confold")
cache = apt.Cache() cache = apt.Cache()
cache.open(None) cache.open(None)
cache.upgrade(True) cache.upgrade(True)
@ -558,6 +563,7 @@ def tools_upgrade(operation_logger, auth, ignore_apps=False, ignore_packages=Fal
operation_logger.start() operation_logger.start()
try: try:
os.environ["DEBIAN_FRONTEND"] = "noninteractive"
# Apply APT changes # Apply APT changes
# TODO: Logs output for the API # TODO: Logs output for the API
cache.commit(apt.progress.text.AcquireProgress(), cache.commit(apt.progress.text.AcquireProgress(),
@ -570,6 +576,8 @@ def tools_upgrade(operation_logger, auth, ignore_apps=False, ignore_packages=Fal
else: else:
logger.info(m18n.n('done')) logger.info(m18n.n('done'))
operation_logger.success() operation_logger.success()
finally:
del os.environ["DEBIAN_FRONTEND"]
else: else:
logger.info(m18n.n('packages_no_upgrade')) logger.info(m18n.n('packages_no_upgrade'))