[neon/neon/ubuntu-advantage-tools/Neon/release] debian: move then conf file, recreate an empty one then dpkg-divert

Carlos De Maine null at kde.org
Fri Jun 19 07:04:29 BST 2026


Git commit 712fd4304c55ff849594e1eb5b4a292930da8a7e by Carlos De Maine.
Committed on 19/06/2026 at 06:04.
Pushed by carlosdem into branch 'Neon/release'.

move then conf file, recreate an empty one then dpkg-divert

M  +3    -1    debian/ubuntu-advantage-tools.postinst

https://invent.kde.org/neon/neon/ubuntu-advantage-tools/-/commit/712fd4304c55ff849594e1eb5b4a292930da8a7e

diff --git a/debian/ubuntu-advantage-tools.postinst b/debian/ubuntu-advantage-tools.postinst
index 2fbb4de..e8658d1 100644
--- a/debian/ubuntu-advantage-tools.postinst
+++ b/debian/ubuntu-advantage-tools.postinst
@@ -8,7 +8,9 @@ systemctl mask apt-news.service esm-cache.service​ >/dev/null 2>&1 || true
 
 # dpkg-divert the service away as well
 dpkg-divert --rename --remove /etc/apt/apt.conf.d/20apt-esm-hook.conf  || true
-dpkg-divert --no-rename --add /etc/apt/apt.conf.d/20apt-esm-hook.conf
+mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.orig
+touch /etc/apt/apt.conf.d/20apt-esm-hook.conf
+dpkg-divert --no-rename --divert /etc/apt/apt.conf.d/20apt-esm-hook.conf.orig --add /etc/apt/apt.conf.d/20apt-esm-hook.conf
 #DEBHELPER#
 
 exit 0


More information about the Neon-commits mailing list