Verified for an upgrade from Bionic to Cosmic:

bdmurray@clean-bionic-amd64:~$ grep conffile-prompt 
/var/log/dist-upgrade/main.log 
2019-05-14 16:19:53,226 WARNING got a conffile-prompt from dpkg for file: 
'/etc/update-manager/release-upgrades'
2019-05-14 16:19:58,232 WARNING replied no to the conffile-prompt for file: 
'/etc/update-manager/release-upgrades'
bdmurray@clean-bionic-amd64:~$ head -n10 /var/log/dist-upgrade/main.log 
2019-05-14 16:03:25,448 INFO Using config files '['./DistUpgrade.cfg']'
2019-05-14 16:03:25,448 INFO uname information: 'Linux clean-bionic-amd64 
4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64'
2019-05-14 16:03:25,783 INFO apt version: '1.6.10'
2019-05-14 16:03:25,784 INFO python version: '3.6.7 (default, Oct 22 2018, 
11:32:17) 
[GCC 8.2.0]'
2019-05-14 16:03:25,786 INFO release-upgrader version '18.10.11.8' started
2019-05-14 16:03:25,799 INFO locale: 'en_US' 'UTF-8'
2019-05-14 16:03:25,871 DEBUG setting up environ for non-interactive use
2019-05-14 16:03:26,083 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-14 16:03:26,117 DEBUG enable dpkg --force-overwrite

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1796193

Title:
  DistUpgradeViewNonInteractive crashes / requires interaction

Status in apt package in Ubuntu:
  Incomplete
Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in apt source package in Cosmic:
  New
Status in ubuntu-release-upgrader source package in Cosmic:
  Fix Committed
Status in apt source package in Disco:
  New
Status in ubuntu-release-upgrader source package in Disco:
  Fix Committed
Status in apt source package in Eoan:
  Incomplete
Status in ubuntu-release-upgrader source package in Eoan:
  Fix Released

Bug description:
  [Impact]
  The NonInteractive view of ubuntu-release-upgrader doesn't work so it is hard 
to automate upgrade testing.

  [Test Case]
  You need to create a situation where you'll receive a conffile prompt since 
the handling of those is broken.

  1) On a bionic system modify /etc/update-manager/release-upgrades so that 
Prompt=normal
  2) Test an upgrade from bionic to cosmic or disco i.e. run do-release-upgrade 
--frontend DistUpgradeViewNonInteractive
  3) Observe the upgrade hang on the '/etc/update-manager/release-upgrades' 
conffifle and the following in /var/log/dist-upgrade/main.log
  "2019-05-10 21:21:21,313 WARNING got a conffile-prompt from dpkg for file: 
'/etc/update-manager/release-upgrades'
  2019-05-10 21:21:26,319 ERROR error 'a bytes-like object is required, not 
'str'' when trying to write to the conffile"

  With the version of the release-upgrader from -proposed you'll no
  longer observe the upgrade process hanging.

  [Regression Potential]
  The fix is making it so that a byte object is passed to the prompt instead of 
a string one so there really isn't one, however additional logging which could 
result in a Traceback if the syntax of that is wrong.

  [Original Description]
  I'm trying to do some automated testing that involved upgrading a system from 
xenial to bionic, so I need it to not ask for user input.

  Before running do-release-upgrade, the system got a fresh dist-upgrade
  and reboot.

  To avoid interactive responses, I'm using:
  $ sudo do-release-upgrade -d -f DistUpgradeViewNonInteractive

  Part way through the upgrade, I do get prompted for something though:
  Preparing to unpack .../apt_1.6.3ubuntu0.1_amd64.deb ...

  Unpacking apt (1.6.3ubuntu0.1) over (1.2.27) ...

  Processing triggers for libc-bin (2.27-3ubuntu1) ...

  /sbin/ldconfig.real: Warning: ignoring configuration file that cannot
  be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf: No such file
  or directory

  /sbin/ldconfig.real: Warning: ignoring configuration file that cannot
  be opened: /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf: No such file or
  directory

  Setting up apt (1.6.3ubuntu0.1) ...

  Installing new version of config file /etc/apt/apt.conf.d/01autoremove
  ...

  Configuration file '/etc/cron.daily/apt-compat'

   ==> Deleted (by you or by a script) since installation.

   ==> Package distributor has shipped an updated version.

     What would you like to do about it ?  Your options are:

      Y or I  : install the package maintainer's version

      N or O  : keep your currently-installed version

        D     : show the differences between the versions

        Z     : start a shell to examine the situation

   The default action is to keep your current version.

  Comparing the sha1 of apt-compat before the upgrade to another xenial
  system that has been unmodified, they are the same:

  In /var/log/dist-upgrade/main.log, I also found this:
  2018-10-04 14:20:24,575 WARNING got a conffile-prompt from dpkg for file: 
'/etc/cron.daily/apt-compat'
  2018-10-04 14:20:29,580 ERROR error 'a bytes-like object is required, not 
'str'' when trying to write to the conffile

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to