Hello,
It seems that my unstable chroot is broken. When I do an upgrade, I get this error message
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
/srv/chroot/unstable-i386-sbuild has Operating System (Debian Unstable) "i386" ... ok
/srv/chroot/unstable-i386-sbuild noop property ... ok
/srv/chroot/unstable-i386-sbuild apt installed apt-transport-https ... ok
/srv/chroot/unstable-i386-sbuild standard sources.list ... ok
Hit:1 http://ftp2.fr.debian.org/debian unstable InRelease
Hit:2 http://mirrors.kernel.org/debian unstable InRelease
/srv/chroot/unstable-i386-sbuild apt update ... failed
/srv/chroot/unstable-i386-sbuild apt cache cleaned ... ok
mordor chroot /srv/chroot/unstable-i386-sbuild provisioned ... failed
the properties are here
sbuild :: System -> Proxy -> RevertableProperty HasInfo
sbuild system proxy = Sbuild.schroot schrootname chroot
where
chroot = Chroot.debootstrapped Debootstrap.BuilddD chrootdir
& os system
& case proxy of
(Just p) -> "/etc/apt/apt.conf.d/01proxy" File.hasContent
["Acquire::http::Proxy \"" ++ p ++ "\";"]
Nothing -> doNothing
& Apt.installed ["apt-transport-https"]
& Apt.stdSourcesList
& Apt.update onChange
Apt.upgrade
& Apt.cacheCleaned
schrootname = Sbuild.schrootname system
chrootdir = "/srv/chroot" schrootname
so the update failed and the solution seems to be
dpkg --configure -a
Is it possible to deal with this problem in the update property in order to make it transparent for the users.
Cheers
Frederic
There are several ways this could happen, along the lines of a power failure or ctrl-c at the wrong time. A failing postinst may also cause apt to leave other packages un-configured, although
dpkg configure -a
probably won't recover from that case.I think it makes sense for Apt.upgrade to run
dpkg --configure -a
in case the last upgrade got into this state. I don't think it makes sense for Apt.install to do that (too much overhead to do it every time, and I don't think that unconfigured packages normally prevent installing of an unrelated package anyway). I've made a change along these lines.Hello, joey now that I installed 2.17.1 I can test the fix but...
my property is
so it failes in the Apt.update and do not reach Apt.upgrade so it seems that update should be fixed also
Hmm, I don't ever remember seeing apt-get update need dpkg --configure -a. It's rather weird that it would; the files it updates are fully independent of the files dpkg does AIUI.
I found this in the apt code
Here the c++ code of apt
so there is a dirty journal. (maybe due to a power off during the chroot update)
Hello Joey
with 2.17.2 I get this. (there is nevertheless a progression in the right direction :p)
so now the proposition is to run
apt -f install
So what is the right way to solve this (I hope) last issue during chroot upgrade?So I don't see how you could get into this situation unless perhaps your debootstrap configuration gets into a broken dependency situation somehow.
IIRC, apt-get -f install can decide to remove arbitrary packages as necessary to get to a sane dependency tree. So I'm very dubious about doing it by default.