[Bug 1873810] Re: chrony package removal fails

2020-04-20 Thread Launchpad Bug Tracker
This bug was fixed in the package chrony - 3.5-6ubuntu6

---
chrony (3.5-6ubuntu6) focal; urgency=medium

  * d/postrm: Reinstate the remove target (LP: #1873810)

 -- Christian Ehrhardt   Mon, 20 Apr
2020 15:58:52 +0200

** Changed in: chrony (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1873810

Title:
  chrony package removal fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1873810/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1873810] Re: chrony package removal fails

2020-04-20 Thread Christian Ehrhardt 
** Description changed:

- In a fresh 20.04 lxc/chroot install, then remove chrony:
+ [Impact]
+ 
+  * I was cherry-picking a fix we needed due to the recent systemd
+changes to timesyncd. There was also a fix-of-the-fix a bit later which 
+is missing and therefore breaking package removal.
+ 
+  * The fix is as simple as adding the "remove" target to the case statement
+on the empty target and thereby avoiding breakage.
+ 
+ [Test Case]
+ 
+  * apt install chrony
+  * apt install systemd-timesyncd
+# this should list and work:
+The following packages will be REMOVED:
+  chrony
+  * apt install chrony
+  * apt remove chrony
  
  
- # apt install chrony
- ...
- # apt install systemd-timesyncd
+ [Regression Potential] 
+ 
+  * It is a silly bug due to cherry picking a fix without the fix-of-the-
+fix. I honestly see no regression due to re-adding "remove" target.
+ 
+ [Other Info]
+  
+  * This does not necessarily have to be on the -release. Nothing to stop 
+generating the ISO at least. But I'd appreciate if we could accept it 
+into -proposed asap to hopefully (if we rebuild once) pick it up.
+The reason is that I haven't seen reports, but can think of odd 
+dependency chains like
+ 1. install chrony (will remove systemd-timesyncd)
+ 2. remove chrony fails
+ 3. but installing systemd-timesyncd fails as well
+It can be hard to get this resolved and the change is small.
+So I'd appreciate if we could avoid it completely.
+ 
+ root@f:~# apt install systemd-timesyncd
  Reading package lists... Done
- uilding dependency tree   
+ Building dependency tree   
  Reading state information... Done
- The following package was automatically installed and is no longer required:
-   libfreetype6
- Use 'apt autoremove' to remove it.
  The following packages will be REMOVED:
chrony
  The following NEW packages will be installed:
systemd-timesyncd
  0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
- Need to get 27.9 kB of archives.
+ 1 not fully installed or removed.
+ Need to get 0 B/27.9 kB of archives.
  After this operation, 290 kB disk space will be freed.
- Do you want to continue? [Y/n] 
- Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 systemd-timesyncd 
amd64 245.4-4ubuntu1 [27.9 kB]
- Fetched 27.9 kB in 0s (951 kB/s)
+ Do you want to continue? [Y/n] Y
  dpkg: chrony: dependency problems, but removing anyway as you requested:
   systemd depends on systemd-timesyncd | time-daemon; however:
Package systemd-timesyncd is not installed.
Package time-daemon is not installed.
Package systemd-timesyncd which provides time-daemon is not installed.
Package chrony which provides time-daemon is to be removed.
  
- (Reading database ... 31279 files and directories currently installed.)
+ (Reading database ... 83798 files and directories currently installed.)
  Removing chrony (3.5-6ubuntu5) ...
  postrm called with unknown argument `remove'
  dpkg: error processing package chrony (--remove):
   installed chrony package post-removal script subprocess returned error exit 
status 1
  dpkg: too many errors, stopping
  Errors were encountered while processing:
   chrony
  Processing was halted because there were too many errors.
  E: Sub-process /usr/bin/dpkg returned an error code (1)
- root@ff-chrony:~# history 
- 1  apt install chrony
- 2  apt install systemd-timesyncd
- 3  history 
+ 
+ 
+ ---
+ 
+ 
+ In a fresh 20.04 lxc/chroot install, then remove chrony:
+ 
+ # apt install chrony
+ ...
+ # apt install systemd-timesyncd
+ Reading package lists... Done
+ uilding dependency tree
+ Reading state information... Done
+ The following package was automatically installed and is no longer required:
+   libfreetype6
+ Use 'apt autoremove' to remove it.
+ The following packages will be REMOVED:
+   chrony
+ The following NEW packages will be installed:
+   systemd-timesyncd
+ 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+ Need to get 27.9 kB of archives.
+ After this operation, 290 kB disk space will be freed.
+ Do you want to continue? [Y/n]
+ Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 systemd-timesyncd 
amd64 245.4-4ubuntu1 [27.9 kB]
+ Fetched 27.9 kB in 0s (951 kB/s)
+ dpkg: chrony: dependency problems, but removing anyway as you requested:
+  systemd depends on systemd-timesyncd | time-daemon; however:
+   Package systemd-timesyncd is not installed.
+   Package time-daemon is not installed.
+   Package systemd-timesyncd which provides time-daemon is not installed.
+   Package chrony which provides time-daemon is to be removed.
+ 
+ (Reading database ... 31279 files and directories currently installed.)
+ Removing chrony (3.5-6ubuntu5) ...
+ postrm called with unknown argument `remove'
+ dpkg: error processing package chrony (--remove):
+  installed chrony package post-removal script subprocess returned error exit 
status 1
+ dpkg: too many errors, stopping
+ Errors were enc

[Bug 1873810] Re: chrony package removal fails

2020-04-20 Thread Christian Ehrhardt 
# targets: purge|remove|upgrade|failed-upgrade|abort-install|abort-
upgrade|disappear

but
purge)
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)


Broken by:
commit d70baea9c674ffc6cc6db5a8c3eb5d3590002a12
Author: Vincent Blut 
Date:   Sat Apr 4 21:56:46 2020 +0200

d/postrm: Stop starting systemd-timesyncd in postrm (Closes:
#955773)

Fixed by:
commit 9894b23bcf0689f11b47c197d0d62f11b9ca0368
Author: Vincent Blut 
Date:   Sat Apr 4 22:15:58 2020 +0200

d/postrm: Reinstate the remove target

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1873810

Title:
  chrony package removal fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1873810/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1873810] Re: chrony package removal fails

2020-04-20 Thread Christian Ehrhardt 
Thanks rbalint, confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1873810

Title:
  chrony package removal fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1873810/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs