[Bug 1649370] [NEW] libnss-{resolve,myhostname} don’t install correctly if previously removed without being purged

Anders Kaseorg andersk at mit.edu
Mon Dec 12 18:46:51 UTC 2016


Public bug reported:

# grep hosts /etc/nsswitch.conf
hosts:          files myhostname dns
# apt install libnss-resolve
# grep hosts /etc/nsswitch.conf
hosts:          files myhostname resolve [!UNAVAIL=return] dns
# apt remove libnss-resolve
# grep hosts /etc/nsswitch.conf
hosts:          files myhostname dns
# apt install libnss-resolve
# grep hosts /etc/nsswitch.conf
hosts:          files myhostname dns

libnss-resolve.postinst and libnss-myhostname.postinst only update
/etc/nsswitch.conf if [ "$1" = configure ] && [ -z "$2" ].  If the
package was previously removed but not purged (it is in the Config-Files
state), dpkg passes the previous version as $2, so this fails.

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: zesty

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

Title:
  libnss-{resolve,myhostname} don’t install correctly if previously
  removed without being purged

Status in systemd package in Ubuntu:
  New

Bug description:
  # grep hosts /etc/nsswitch.conf
  hosts:          files myhostname dns
  # apt install libnss-resolve
  # grep hosts /etc/nsswitch.conf
  hosts:          files myhostname resolve [!UNAVAIL=return] dns
  # apt remove libnss-resolve
  # grep hosts /etc/nsswitch.conf
  hosts:          files myhostname dns
  # apt install libnss-resolve
  # grep hosts /etc/nsswitch.conf
  hosts:          files myhostname dns

  libnss-resolve.postinst and libnss-myhostname.postinst only update
  /etc/nsswitch.conf if [ "$1" = configure ] && [ -z "$2" ].  If the
  package was previously removed but not purged (it is in the Config-
  Files state), dpkg passes the previous version as $2, so this fails.

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



More information about the foundations-bugs mailing list