Package: sbuild Version: 0.60.4-1 Severity: minor Tags: patch User: ubuntu-devel-disc...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch
Hey So I've configured my sbuild to "$apt_upgrade = 1;" and "$apt_distupgrade = 1;", and either of them will break the build because of dpkg prompting for a conffile update: Setting up netbase (4.43ubuntu1) ... Configuration file `/etc/protocols' ==> Modified (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. *** protocols (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing netbase (--configure): EOF on stdin at conffile prompt [...] Errors were encountered while processing: netbase E: Sub-process /usr/bin/dpkg returned an error code (1) I see DEBIAN_FRONTEND is correctly set to noninteractive for debconf prompts; I propose that apt-get upgrade/dist-upgrade set dpkg opts to pass --force-confold, see attached patch to ChrootSetup.pm. Thanks for considering! (I will also look at the reason for protocols being patched in Launchpad chroots over the netbase defaults) -- Loïc Minier
--- ChrootSetup.pm 2010-11-13 18:36:38.995927001 +0100 +++ /usr/share/perl5/Sbuild/ChrootSetup.pm 2010-11-13 18:38:01.905927002 +0100 @@ -63,7 +63,7 @@ sub upgrade ($$) { my $conf = shift; $session->run_apt_command( - { COMMAND => [$conf->get('APT_GET'), '-uy', 'upgrade'], + { COMMAND => [$conf->get('APT_GET'), '-uyo', 'Dpkg::Options::=--force-confold', 'upgrade'], ENV => {'DEBIAN_FRONTEND' => 'noninteractive'}, USER => 'root', DIR => '/' }); @@ -75,7 +75,7 @@ sub distupgrade ($$) { my $conf = shift; $session->run_apt_command( - { COMMAND => [$conf->get('APT_GET'), '-uy', 'dist-upgrade'], + { COMMAND => [$conf->get('APT_GET'), '-uyo', 'Dpkg::Options::=--force-confold', 'dist-upgrade'], ENV => {'DEBIAN_FRONTEND' => 'noninteractive'}, USER => 'root', DIR => '/' });