[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dodging the localepurge bullet



So I decided to install localepurge to save some disk space.
First I invoked the man page to make sure it was exactly
what I wanted.  It didn't come up.  Then I realized I would
have to install localepurge first, just to read the man page.

My first mistake.

While pondering the first question in the localepurge debconf
installation window, it occurred to me that the package was
possibly going to potentially seriously alter my system
during installation. I decided to first do a little research
before proceeding.  In the APT-HOWTO I read the following:

  It is very easy to configure [localepurge], debconf
  questions guide the user in a step-by-step configuration.
  Be very careful on answering the first question though,
  wrong answers may remove all the locales files, even the
  ones you use. The only way to recover these files is
  reinstalling all the packages that provide them.

Ouch!  I decided even more caution was in order, so I looked
up the localepurge man page online (what I should have done
in the first place), where I read this:

  A Word of CAUTION
  Please note, that this tool is a hack which is not integrated
  with Debian's package management system and therefore is not
  meant for the faint of heart. Responsibility for its usage and
  possible breakage of your system therefore lies in the sysadmin's
  (your) hands.  Please definitely do abstain from reporting any
  bugs blaming localepurge if you break your system by using it.
  If you don't know what you are doing and can't handle any resulting
  breakage on your own then please simply don't use it.

That settled it. I wanted to back out without answering the
problematic first question which I didn't know how to answer,
because I didn't know what I was doing, and I was faint of heart.

So I clicked on the debconf "cancel" button, but the package
proceeded to install anyway.  Only then did I realized that the
"cancel" button apparently applied to the debconf questions only,
but not to the apt-get install itself.  (At least I had to assume
that as a worst case possibility.)

The installation continued with a crytic warning message:

DESTROY created new reference to dead object ' Qt::CheckBox', <GEN1> line 6 during global destruction.

Less than reassured by the thought of global destruction and
dead objects, and trying to (very quickly) decide what to do,
I glanced again at the online man page for guidance, and read this:

  All locale directories containing a subdirectory named
  LC_MESSAGES which are either commented out or not even
  listed at all in /etc/locale.nopurge will be irreversibly
  deleted. The only way to reinstall any lost locales is a
  complete reinstallation of all the Debian packages containing
  them.

Double ouch!  A hasty check revealed that /etc/locale.nopurge
didn't even exist, must less list the critical files that would
be destroyed,  meaning I had to assume the worst and take the
man page author at his word.  My system was about to be imminently
clobbered, and the clock was ticking.

That pretty much settled it.  For the first time in 10 years
of running Debian, I would have to abort a package install, or
risk problems I didn't know how to fix, with no help from a package
maintainer who promised not to support me, nor even the option of
filing a bug report.

So I aborted it, but this only led to new problems.  "dpkg -P localepurge"
now refused to remove the package::

silurian:~# dpkg -P localepurge
dpkg: error processing localepurge (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 localepurge
silurian:~#

If I followed this advice it would have just repeated the cycle
once again, leaving me in the same pickle, facing that critical first
that I didn't know how to answer, which could possibly irretrievably
damage my system, since I didn't know what I was doing and nobody
would help me fix it.  (And I was faint of heart.)

Well here's where having a dog-slow system may have saved my bacon.
I let "apt-get install locale-purge" run a little longer the next
time before aborting, and bingo!  "dpkg -P localepurge" worked
this time without an error.  (I hope.)

As if to scare me it left this parting shot on my console:

 To reinstall all the packages which localepurge has been taking care
  of before, you can use the following command:

    apt-get --reinstall install $(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '\n' | sort -u)

  For your further usage, the file "/var/tmp/reinstall_debs.sh"
  contains an enhanced version the command line printed out above.

I hope I escaped the wrath of localepurge, and can avoid a session of
playing Debian Doctor.  Only time (and a run of debsums -ca) will tell
for sure.

And I also hope you found this story as entertaining as I did living
through it.  What's life without a little excitement?  Debian, normally
a very boring predictable distro, hasn't given me this much exitement
in years.

But is this a bug report?  You tell me.  I know I'm completely at fault
but just because I'm at fault doesn't mean they (the bugs) are not out
to get me.  And whatever those bugs might be, I know can't them as
localepurge bugs.  But can I report localepurge itself as a bug?  Shoo!  ;^)

-Marty



Reply to: