Re: /var/lib/dpkg/alternatives: FIXED

2002-11-15 Thread Seneca
On Fri, Nov 15, 2002 at 05:44:59PM +, Pigeon wrote:
> On Wed, 13 Nov 2002 22:44:38 -0500, Jerome Acks Jr
> <[EMAIL PROTECTED]> wrote:
> >See man update-alternatives to see how you would normally modify files
> >in /var/lib/dpkg/alternatives. I am not sure if anything would break
> >if you just delete the files. 
> 
> Ah, the old Linux game, guess the name of the man page :-)

apropos is helps me play that game.

seneca@dodecagon:~$ apropos alternatives
update-alternatives (8) - maintain symbolic links determining default commands
seneca@dodecagon:~$

-- 
Seneca
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: /var/lib/dpkg/alternatives: FIXED

2002-11-15 Thread Pigeon
On Wed, 13 Nov 2002 22:44:38 -0500, Jerome Acks Jr
<[EMAIL PROTECTED]> wrote:

>On Wed, Nov 13, 2002 at 04:21:59AM +, Pigeon wrote:
>> Well I've got round my ldconfig problems. Eventually I found
>> base2_1.tgz on my Debian CD, unzipped it on my Windoze box, wrote it
>> to a CD, and copied stuff in using the rescue disk. With the addition
>> of some of the rescue disk itself (fsck) I got an ldconfig, and got it
>> to boot again, after several false starts. I then used dpkg -i to
>> reinstall most of the stuff in main/binary-i386/base which got most
>> stuff working, including dselect.
>> 
>> I'm now using dselect to reinstall pretty much everything and get the
>> system back into a consistent state. I have got a few errors on some
>> packages due to /var/lib/dpkg/alternatives/foo being corrupt. (eg. foo
>> = awk)
>> 
>> Is it permissible simply to delete these files? Will I risk breaking
>> the whole thing again? If so, how do I restore them?
>
>See man update-alternatives to see how you would normally modify files
>in /var/lib/dpkg/alternatives. I am not sure if anything would break
>if you just delete the files. 

Ah, the old Linux game, guess the name of the man page :-)

>The files in /var/lib/dpkg/alternatives are ascii text, so you could edit
>them with vi, emacs, bvi, or any text editor. I would suggest bvi or
>ghex so you can see what nonprintable are in the files. 
>
>Here is a couple of examples (vi & emacs) of what files in
>/var/lib/dpkg/alternatives look like. These would be different on you
>computer depending on what packages you have installed. 
>
>I hope this helps.

Yeah, it did. Thanks! The format of the entries was OK, and the files
looked normal when catted. Viewing unprintables revealed the presence
of Microsoft LF/CR line breaks...

>> I found base2_1.tgz on my Debian CD, unzipped it on my Windoze box,
>>wrote it to a CD, and copied stuff in using the rescue disk.

...WinZip had oh-so-helpfully inserted CRs into every single text
file. Curiously, this only actually broke a few of them, so I thought
it was an isolated phenomenon until I scanned the whole of the
LoseZip-unzipped base2_1.tgz and found about 500 files. AARGH! Moral:
Never forget that Windoze software does stupid things without telling
you.

Thanks again,
Pigeon

C:\WINDOWS>ren win.com lose.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: /var/lib/dpkg/alternatives

2002-11-13 Thread Jerome Acks Jr
On Wed, Nov 13, 2002 at 04:21:59AM +, Pigeon wrote:
> Well I've got round my ldconfig problems. Eventually I found
> base2_1.tgz on my Debian CD, unzipped it on my Windoze box, wrote it
> to a CD, and copied stuff in using the rescue disk. With the addition
> of some of the rescue disk itself (fsck) I got an ldconfig, and got it
> to boot again, after several false starts. I then used dpkg -i to
> reinstall most of the stuff in main/binary-i386/base which got most
> stuff working, including dselect.
> 
> I'm now using dselect to reinstall pretty much everything and get the
> system back into a consistent state. I have got a few errors on some
> packages due to /var/lib/dpkg/alternatives/foo being corrupt. (eg. foo
> = awk)
> 
> Is it permissible simply to delete these files? Will I risk breaking
> the whole thing again? If so, how do I restore them?

See man update-alternatives to see how you would normally modify files
in /var/lib/dpkg/alternatives. I am not sure if anything would break
if you just delete the files. 

The files in /var/lib/dpkg/alternatives are ascii text, so you could edit
them with vi, emacs, bvi, or any text editor. I would suggest bvi or
ghex so you can see what nonprintable are in the files. 

Here is a couple of examples (vi & emacs) of what files in
/var/lib/dpkg/alternatives look like. These would be different on you
computer depending on what packages you have installed. 

$ cat /var/lib/dpkg/alternatives/vi
manual
/usr/bin/vi
vi.1.gz
/usr/share/man/man1/vi.1.gz

/usr/bin/nvi
30
/usr/share/man/man1/nvi.1.gz
/usr/bin/vim
120
/usr/share/man/man1/vim.1.gz
/usr/bin/elvisnox
120
/usr/share/man/man1/elvis.1.gz
/bin/elvis-tiny
10
/usr/share/man/man1/elvis-tiny.1.gz
/usr/bin/e3vi
10
/usr/share/man/man1/e3vi.1.gz

$ cat /var/lib/dpkg/alternatives/emacs  
auto
/usr/bin/emacs
emacs.1.gz
/usr/share/man/man1/emacs.1.gz

/usr/bin/emacs21
24
/usr/share/man/man1/emacs.1emacs21.gz
/usr/bin/e3em
10
/usr/share/man/man1/e3em.1.gz
/usr/bin/emacs20
23
/usr/share/man/man1/emacs.1emacs20.gz

The first line of the /var/lib/dpkg/alternatives/foo is mode.
Second line is the alternative command symlink.
Third line refers to filename in /etc/alternatives/
Fourth line is man symlink.
Fifth line is single LF (hex 0A, '\n')

The remaining lines are various alternative commands, priorities, and
associated man pages. The file ends with two LFs.

I hope this helps.

-- 
Jerome


msg12838/pgp0.pgp
Description: PGP signature


/var/lib/dpkg/alternatives

2002-11-12 Thread Pigeon
Well I've got round my ldconfig problems. Eventually I found
base2_1.tgz on my Debian CD, unzipped it on my Windoze box, wrote it
to a CD, and copied stuff in using the rescue disk. With the addition
of some of the rescue disk itself (fsck) I got an ldconfig, and got it
to boot again, after several false starts. I then used dpkg -i to
reinstall most of the stuff in main/binary-i386/base which got most
stuff working, including dselect.

I'm now using dselect to reinstall pretty much everything and get the
system back into a consistent state. I have got a few errors on some
packages due to /var/lib/dpkg/alternatives/foo being corrupt. (eg. foo
= awk)

Is it permissible simply to delete these files? Will I risk breaking
the whole thing again? If so, how do I restore them?

TIA
Pigeon


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]