#795396 aptitude: DEBIAN_FRONTEND does not affect the debconf invoked by "aptitude

#795396#5
Date:
2015-08-13 16:04:48 UTC
From:
To:
Hi,

export DEBIAN_FRONTEND=noninteractive
aptitude --quiet=2 update
aptitude --quiet=2 -o Dir::Etc::sourcelist=$tmpsources -y safe-upgrade

Results in an interactive debconf session on jessie.  This was not
the case on wheezy.  (Assuming of course the safe-upgrade results
in a change that invokes debconf.)

Debconf version: 1.5.56

$ debconf-show debconf
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
  debconf-apt-progress/info:
* debconf/frontend: Readline
  debconf-apt-progress/title:
  debconf-apt-progress/preparing:
  debconf-apt-progress/media-change:
* debconf/priority: medium

#795396#10
Date:
2015-09-06 15:15:56 UTC
From:
To:
Hi Karl,

2015-08-13 17:04 Karl O. Pinc:

As far as I know, aptitude doesn't have any code handling this variable
or debconf directly.  Why do you think that it is a problem in aptitude?

Also, what does happen if you use apt-get instead?


Cheers.

#795396#17
Date:
2015-09-06 19:12:15 UTC
From:
To:
Hi Manual,

Thanks for the reply.

I don't know that it's a problem in aptitude (or what
aptitude's code handles).  I reported the bug to aptitude
because that the only code path I know for sure exhibits
the bug.

I figured you guys would have a better idea of what
the source of the problem is than I do.  Feel free
to reassign the bug to another package that is more
appropriate.
a test environment to reproduce the problem.  It requires
that an installed package get an update put into a repo
and that the update makes changes to a user-modifed
config file (right?) so that debconf is invoked when
the update is installed.

I'm not apt-savvy enough just now to be able to re-create the
problem on my own.  I'd be willing to try to reproduce
the problem with apt-get but I'd need some help.  I
haven't tried to research the problem but, offhand,
I couldn't even give you a list of steps that would
reach the goal.  My guess would be I'd have to learn
how to create a .deb package, and maybe an apt repo.

My hope was that by reporting the problem somebody
with experience would magically step in and
resolve the issue.  :-)  Please advise.

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

#795396#22
Date:
2015-09-07 21:23:16 UTC
From:
To:
Hello Karl,

2015-09-06 20:12 Karl O. Pinc:

I never used that feature of debconf, so I am not familiar at all with
it, sorry.

Perhaps it also work installing some package that you don't need, but it
is harmless, and know for sure that uses debconf?

I could try to reproduce it, but as I said above, I never used it so I
don't know how it would look like, and even then I wouldn't know if it's
the problem that you observed.

If you cannot test with the suggestion above, I think that it's better
to reassign to debconf package itself, let me know if you want me to do
this.


Cheers.

#795396#27
Date:
2015-09-09 02:25:42 UTC
From:
To:
Hi Manual,

On Mon, 7 Sep 2015 22:23:16 +0100 "Manuel A. Fernandez Montecelo" <manuel.montezelo@gmail.com> wrote:
problem -- it's on upgrade that debconf really wants
to ask questions when a new config is incompatible with
a user-modified config.

Per a suggestion on IRC #debian I tried (because I saw
the problem with apache2):

dpkg-i \
 /var/cache/apt/archives/apache2_2.4.10-10+deb8u1_i386.deb \
 /var/cache/apt/archives/apache2-bin_2.4.10-10+deb8u1_i386.deb \
 /var/cache/apt/archives ^M/apache2-data_2.4.10-10+deb8u1_all.deb

I believe this would get me back to the version which, on upgrade,
I saw the problem.  But I could not reproduce the problem.

My current apache2 version is: 2.4.10-10+deb8u3

Note that the apache2 changelog says:

apache2 (2.4.10-10+deb8u2) jessie; urgency=medium

  [ Stefan Fritsch ]
  * Fix upgrade logic: When upgrading from wheezy with apache2.2-common
    but without apache2 installed to jessie, part of the conffile
  handling logic would not run, causing outdated conffile content to be
  kept. This is part of the solution for bug #794933. The other part
  will be included in the upgrade to Debian 9 (stretch).
<snip>
 -- Stefan Fritsch <sf@debian.org>  Thu, 27 Aug 2015 19:52:37 +0200

Seems to me that whatever fix was made to the upgrade logic
is what triggered the problem, but that's a guess.

Since I'm kinda stuck reproducing the problem I think you'd
better reassign this to the debconf package.  Maybe they'll
be able to help.

For the sake of completeness I've found the log output
which prompted this report.  It
dates to: Sun,  2 Aug 2015 06:26:00 -0500 (CDT)

(Now you know what the problem looks like.  :-)

(FYI: Although aptitude is being invoked with --quiet=2
it's outputting it's dynamic progress report.  A change
from Wheezy and something I should put into another
bug report.)
------------------------<snip>------------------------- The following packages will be upgraded: apache2 apache2-bin apache2-data apache2-mpm-prefork apache2-utils libicu52 6 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 8,384 kB of archives. After unpacking 7,168 B will be freed. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 86260 files and directories currently installed.) Preparing to unpack .../apache2-mpm-prefork_2.4.10-10+deb8u1_amd64.deb ... Unpacking apache2-mpm-prefork (2.4.10-10+deb8u1) over (2.4.10-10) ... Preparing to unpack .../apache2_2.4.10-10+deb8u1_amd64.deb ... Unpacking apache2 (2.4.10-10+deb8u1) over (2.4.10-10) ... Preparing to unpack .../apache2-bin_2.4.10-10+deb8u1_amd64.deb ... Unpacking apache2-bin (2.4.10-10+deb8u1) over (2.4.10-10) ... Preparing to unpack .../apache2-utils_2.4.10-10+deb8u1_amd64.deb ... Unpacking apache2-utils (2.4.10-10+deb8u1) over (2.4.10-10) ... Preparing to unpack .../apache2-data_2.4.10-10+deb8u1_all.deb ... Unpacking apache2-data (2.4.10-10+deb8u1) over (2.4.10-10) ... Preparing to unpack .../libicu52_52.1-8+deb8u2_amd64.deb ... Unpacking libicu52:amd64 (52.1-8+deb8u2) over (52.1-8) ... Processing triggers for systemd (215-17+deb8u1) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up apache2-bin (2.4.10-10+deb8u1) ... Setting up apache2-utils (2.4.10-10+deb8u1) ... Setting up apache2-data (2.4.10-10+deb8u1) ... Setting up apache2 (2.4.10-10+deb8u1) ... Configuration file '/etc/apache2/ports.conf' ==> 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. *** ports.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package apache2 (--configure): EOF on stdin at conffile prompt dpkg: dependency problems prevent configuration of apache2-mpm-prefork: apache2-mpm-prefork depends on apache2 (= 2.4.10-10+deb8u1); however: Package apache2 is not configured yet. dpkg: error processing package apache2-mpm-prefork (--configure): dependency problems - leaving unconfigured Setting up libicu52:amd64 (52.1-8+deb8u2) ... Processing triggers for libc-bin (2.19-18) ... Errors were encountered while processing: apache2 apache2-mpm-prefork E: Sub-process /usr/bin/dpkg returned an error code (1) Failed to perform requested operation on package. Trying to recover: Setting up apache2 (2.4.10-10+deb8u1) ... Configuration file '/etc/apache2/ports.conf' ==> 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. *** ports.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package apache2 (--configure): EOF on stdin at conffile prompt dpkg: dependency problems prevent configuration of apache2-mpm-prefork: apache2-mpm-prefork depends on apache2 (= 2.4.10-10+deb8u1); however: Package apache2 is not configured yet. dpkg: error processing package apache2-mpm-prefork (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: apache2 apache2-mpm-prefork ------------------------<snip>------------------------- Regards, Karl <kop@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
#795396#32
Date:
2015-09-09 12:26:26 UTC
From:
To:
Note for debconf maintainers: I am reassigning because this doesn't
seem to have anything to do with aptitude, so hopefully you will know
if this is a matter concerning debconf or hopefully could point in the
right direction.


2015-09-09 3:25 GMT+01:00 Karl O. Pinc <kop@meme.com>:

I see, I thought that it was happening with any debconf question,
that's why I thuoght that installing any new package would do.

As I said above, reassigned now.

"Reading database" is a message from dpkg, not aptitude, and although
in some cases aptitude calls dpkg directly, I think that in this case
this call is made from apt (so the chain is aptitude->apt->dpkg).  We
do not have facilities to pass "verboseness/quietness" down the chain.

So to report this, dpkg is a better place, I think; I suppose that it
would better not print the progress when the terminal cannot handle
updating lines.


Cheers.

#795396#41
Date:
2015-09-16 13:36:00 UTC
From:
To:
Hello,

This bug is tagged "more information needed".
Is this still true?  If so, what information
is needed?

Regards,



Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein