Dima Kogan <d...@secretsauce.net> writes:

> The issue, as I understand it is that during the emacsen-common
> postinst, emacsen-common decided that emacs22 is installed, and then
> tried to configure stuff for it. This failed because emacs22 wasn't
> actually installed anymore (the upgrade already removed it).
>
> The installed emacs flavor list:
>
> dkogan@t42:/var/lib/emacsen-common/state/flavor/installed$ ls
> emacs22 xemacs21
>
> So the postinst thinks emacs22 and xemacs21 are both still installed.
> This incorrect; aptitude already uninstalled both of these packages.

Is there a chance that the uninstall failed?  Though that should have
stopped things with an error earlier.

You can see in /usr/lib/emacsen-common/emacs-remove that the last thing
it does is remove that state file (assuming it's working).

I suppose one other option is that you were in the middle of
transitioning from pre-2.0.0 emacsen-common, and the code that handles
converting the old installed-flavors files to the new flavor/installed/*
files is broken (i.e. perhaps it's firing *after* the removal somehow in
the same aptitude run -- note I'm not familiar with aptitude, so I don't
know if that could be relevant either, though I assume not.

> Then I get a similar issue with the xemacs21 package:

I vaguely recall that there might be a problem with the xemacs package,
but I believe xemacs has been removed from Debian.  Though I'm not sure
I'm right, or that it's related.

> As a manual workaround, I'm simply going to remove both of the
> /var/lib/emacsen-common/state/flavor/installed/... files. At the very
> least, emacsen-common postinst can check, and do this itself.

I the general case, I'm not sure it can -- it has no way to know what
state things are in if/when the install/remove scripts don't complete
successfully.  We likely need to fix the underlying bug(s).

> In general, is there a strong reason for the state to be stored in
> that directory, separate from dpkg?

I believe so -- the idea of being "installed" and fully configured from
emacsen-common's perspective is not exactly the same as being installed
from dpkg's, though I think the latter should be a superset of the
latter.

I'm also not sure that it's acceptable (or at least "good form") to
query dpkg during the install process for this kind of information --
but I might be wrong.  In any case, specifically for "installed", I'm
not sure what we'd be asking dpkg, i.e. there's no comprehensive list of
"flavors" -- they come and go.

Thanks for the help.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to