Merge ~ahasenack/ubuntu/+source/base-files:focal-handle-was-removed-1895302 into ubuntu/+source/base-files:ubuntu/focal-devel

Proposed by Andreas Hasenack
Status: Approved
Approved by: Andreas Hasenack
Approved revision: b7ace615b967b4c3b790ca268dc889765add1292
Proposed branch: ~ahasenack/ubuntu/+source/base-files:focal-handle-was-removed-1895302
Merge into: ubuntu/+source/base-files:ubuntu/focal-devel
Diff against target: 64 lines (+25/-7)
3 files modified
debian/changelog (+14/-0)
debian/motd-news-config.postinst (+1/-1)
debian/postinst.in (+10/-6)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Canonical Server Core Reviewers Pending
Review via email: mp+390863@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

See comments on the Xenial MP.

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

After the xenial discussion, tagging and uploading b7ace615b967b4c3b790ca268dc889765add1292

$ git push pkg upload/11ubuntu5.3
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 4 threads
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 2.81 KiB | 2.81 MiB/s, done.
Total 21 (delta 15), reused 0 (delta 0)
To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/base-files
 * [new tag] upload/11ubuntu5.3 -> upload/11ubuntu5.3

$ dput ubuntu ../base-files_11ubuntu5.3_source.changes
Checking signature on .changes
gpg: ../base-files_11ubuntu5.3_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../base-files_11ubuntu5.3.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading base-files_11ubuntu5.3.dsc: done.
  Uploading base-files_11ubuntu5.3.tar.xz: done.
  Uploading base-files_11ubuntu5.3_source.buildinfo: done.
  Uploading base-files_11ubuntu5.3_source.changes: done.
Successfully uploaded packages.

Unmerged commits

b7ace61... by Andreas Hasenack

changelog

15c3a02... by Andreas Hasenack

    - d/motd-news-config.postinst: always remove /e/d/motd-news.wasremoved
      if present

833df15... by Andreas Hasenack

    - d/postinst.in: only consider creating the .wasremoved file in upgrades,
      never fresh installs like in debootstrap for example

caad634... by Andreas Hasenack

    - d/postinst.in: re-arrange the cascading conditionals around the
      creation of the .wasremoved file for better clarity

57f9ebf... by Andreas Hasenack

  * Fix handling of /e/d/motd-news.wasremoved (LP: #1895302):
    - d/postinst.in: check if ubuntu-server is installed before creating
      the .wasremoved file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 40b6cd2..9acd5bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
1base-files (11ubuntu5.3) focal; urgency=medium
2
3 * Fix handling of /e/d/motd-news.wasremoved (LP: #1895302):
4 - d/postinst.in: check if ubuntu-server is installed before creating
5 the .wasremoved file
6 - d/postinst.in: re-arrange the cascading conditionals around the
7 creation of the .wasremoved file for better clarity
8 - d/postinst.in: only consider creating the .wasremoved file in upgrades,
9 never fresh installs like in debootstrap for example
10 - d/motd-news-config.postinst: always remove /e/d/motd-news.wasremoved
11 if present
12
13 -- Andreas Hasenack <andreas@canonical.com> Wed, 16 Sep 2020 10:52:35 -0300
14
1base-files (11ubuntu5.2) focal; urgency=medium15base-files (11ubuntu5.2) focal; urgency=medium
216
3 [ Andreas Hasenack ]17 [ Andreas Hasenack ]
diff --git a/debian/motd-news-config.postinst b/debian/motd-news-config.postinst
index a73427f..0be04fd 100644
--- a/debian/motd-news-config.postinst
+++ b/debian/motd-news-config.postinst
@@ -33,9 +33,9 @@ case "$1" in
33 fi33 fi
34 if [ -e /etc/default/motd-news.wasremoved ] && [ -e /etc/default/motd-news ]; then34 if [ -e /etc/default/motd-news.wasremoved ] && [ -e /etc/default/motd-news ]; then
35 sed -i -e 's/^ENABLED=1/# Changed by motd-news-config.postinst:\n# config file was manually removed - disable the service\nENABLED=0/' /etc/default/motd-news35 sed -i -e 's/^ENABLED=1/# Changed by motd-news-config.postinst:\n# config file was manually removed - disable the service\nENABLED=0/' /etc/default/motd-news
36 rm /etc/default/motd-news.wasremoved
37 fi36 fi
38 fi37 fi
38 rm -f /etc/default/motd-news.wasremoved
39 ;;39 ;;
4040
41 abort-upgrade|abort-remove|abort-deconfigure)41 abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/postinst.in b/debian/postinst.in
index c347a62..055c914 100644
--- a/debian/postinst.in
+++ b/debian/postinst.in
@@ -130,12 +130,16 @@ fi
130# it does not put back the file with default contents which would130# it does not put back the file with default contents which would
131# re-enable motd-news131# re-enable motd-news
132motd_news_config="/etc/default/motd-news"132motd_news_config="/etc/default/motd-news"
133if [ ! -e ${motd_news_config} ]; then133# only in upgrades, never fresh installs like in debootstrap
134 if [ ! -e ${motd_news_config}.dpkg-remove ]; then134if [ "$2" != "" ] && \
135 if [ ! -e ${motd_news_config}.dpkg-backup ]; then135 [ ! -e ${motd_news_config} ] && \
136 touch ${motd_news_config}.wasremoved136 [ ! -e ${motd_news_config}.dpkg-remove ] && \
137 fi137 [ ! -e ${motd_news_config}.dpkg-backup ]; then
138 fi138 # The .wasremoved file only matters if ubuntu-server is installed,
139 # because that's what will pull in motd-news-config
140 if dpkg -l ubuntu-server 2>/dev/null | grep -q ^i; then
141 touch ${motd_news_config}.wasremoved
142 fi
139fi143fi
140144
141#DEBHELPER#145#DEBHELPER#

Subscribers

People subscribed via source and target branches