Am Mi, 20.07.2011, 12:16 schrieb Raphael Hertzog:
> please use the mailing list debian-dpkg@lists.debian.org next time.
I've added a Cc: to the list.
> On Wed, 20 Jul 2011, Michael Neuffer wrote:
>> I have ad "db" file which seems to be corrupt and i can't figure out
>> what is wrong.
>
> The database file is corrupted. What did you do to corrupt it? Is there a
> reliable way to corrupt it?
Yes, by editing it by hand. :-)
I had to do it a few weeks earlier to remove
some alternatives that were corrupted by a broken package.
(Things that constantly using unstable can do to you...)
I had to edit and fix alternatives manually every now and then over the
past 15 years or so and never had (major) problems with that. Maybe I was
just lucky so far.
> It lacks lots of empty lines at the end. Each alternative should have a
> set of line like this:
> <masterfile>
> <priority>
> <slave-file-1>
> <slave-file-2>
> ...
> <slave-file-13>
>
> Yet your last alternative only has 4 lines:
> ----
> /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
> 500
>
> /usr/lib/x86_64-linux-gnu/xorg/x11-extra-modules
> ----
Yes I removed them. I wasn't aware that they were significant.
The file format unfortunately isn't documented in the man page.
Is there a way to find out how many empty lines are missing where?
Cheers
Mike
--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 710f483c8257d57dba121e528ccb4edb.squirrel@www.neuf fer.com">http://lists.debian.org/710f483c8257d57dba121e528ccb4edb.squirrel@www.neuf fer.com
07-20-2011, 12:40 PM
Raphael Hertzog
alternatives DB corruption
On Wed, 20 Jul 2011, Michael Neuffer wrote:
> > The database file is corrupted. What did you do to corrupt it? Is there a
> > reliable way to corrupt it?
>
> Yes, by editing it by hand. :-)
So there's no bug in update-alternatives at least.
> I had to do it a few weeks earlier to remove
> some alternatives that were corrupted by a broken package.
> (Things that constantly using unstable can do to you...)
Hum, that should not happen. You should always be able to
update-alternatives to fix stuff.
> I had to edit and fix alternatives manually every now and then over the
> past 15 years or so and never had (major) problems with that. Maybe I was
> just lucky so far.
You won't have to do this in the future, update-alternatives no longer
allows installation of broken alternatives and fixes stuff itself for most
cases.
> > It lacks lots of empty lines at the end. Each alternative should have a
> > set of line like this:
> > <masterfile>
> > <priority>
> > <slave-file-1>
> > <slave-file-2>
> > ...
> > <slave-file-13>
> >
> > Yet your last alternative only has 4 lines:
> > ----
> > /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
> > 500
> >
> > /usr/lib/x86_64-linux-gnu/xorg/x11-extra-modules
> > ----
>
> Yes I removed them. I wasn't aware that they were significant.
*shrug*
> The file format unfortunately isn't documented in the man page.
Because it's not meant to be edited with anything else than
update-alternatives...
> Is there a way to find out how many empty lines are missing where?
I documented the format above... in your specific case you need 15 lines
in total (master + priority + 13 slaves). You already have 4 lines so you
need 11 empty lines after.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Follow my Debian News â–¶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)
--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110720124038.GE1107@rivendell.home.ouaza.com">ht tp://lists.debian.org/20110720124038.GE1107@rivendell.home.ouaza.com
07-20-2011, 02:49 PM
"Michael Neuffer"
alternatives DB corruption
Am Mi, 20.07.2011, 14:40 schrieb Raphael Hertzog:
> On Wed, 20 Jul 2011, Michael Neuffer wrote:
>> > The database file is corrupted. What did you do to corrupt it? Is
>> there a
>> > reliable way to corrupt it?
>>
>> Yes, by editing it by hand. :-)
>
> So there's no bug in update-alternatives at least.
No, not that I know of.
>> I had to do it a few weeks earlier to remove
>> some alternatives that were corrupted by a broken package.
>> (Things that constantly using unstable can do to you...)
>
> Hum, that should not happen. You should always be able to
> update-alternatives to fix stuff.
Not when you manage to get into circular dependencies.
>> I had to edit and fix alternatives manually every now and then over the
>> past 15 years or so and never had (major) problems with that. Maybe I
>> was
>> just lucky so far.
>
> You won't have to do this in the future, update-alternatives no longer
> allows installation of broken alternatives and fixes stuff itself for most
> cases.
When did that change get rolled out?
>> > It lacks lots of empty lines at the end. Each alternative should have
>> a
>> > set of line like this:
>> > [...]
>> Yes I removed them. I wasn't aware that they were significant.
>
> *shrug*
:-)
>> The file format unfortunately isn't documented in the man page.
>
> Because it's not meant to be edited with anything else than
> update-alternatives...
Maybe a warning in the manpage would be good.
Manually fixing up dpkg status & info files becomes an ingrained habit
over the years. The Debian & Ubuntu bleeding egde will cut you every now
and then with problems that force manual intervention.
>> Is there a way to find out how many empty lines are missing where?
>
> I documented the format above...
Yes thank you for that.
> in your specific case you need 15 lines
> in total (master + priority + 13 slaves). You already have 4 lines so you
> need 11 empty lines after.
Thanks! I'll give it a shot when I'm back home. Currently I don't have my
laptop with me.
Cheers
Mike
--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: fe5cbc05f677d24daa0ffbd19f1632a7.squirrel@www.neuf fer.com">http://lists.debian.org/fe5cbc05f677d24daa0ffbd19f1632a7.squirrel@www.neuf fer.com
07-20-2011, 03:03 PM
Raphael Hertzog
alternatives DB corruption
On Wed, 20 Jul 2011, Michael Neuffer wrote:
> > Hum, that should not happen. You should always be able to
> > update-alternatives to fix stuff.
>
> Not when you manage to get into circular dependencies.
You will have to be more specific because this doesn't mean anything to
me.
> > You won't have to do this in the future, update-alternatives no longer
> > allows installation of broken alternatives and fixes stuff itself for most
> > cases.
>
> When did that change get rolled out?
With squeeze (dpkg >= 1.15).
> Manually fixing up dpkg status & info files becomes an ingrained habit
> over the years. The Debian & Ubuntu bleeding egde will cut you every now
> and then with problems that force manual intervention.
While this can be true for {post,pre}{inst,rm}, it's completely
wrong for most others status files (except maybe the statoverride one when
user/groups disappear).
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Follow my Debian News â–¶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)
--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110720150315.GA6791@rivendell.home.ouaza.com">ht tp://lists.debian.org/20110720150315.GA6791@rivendell.home.ouaza.com