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

Re: Dynamic registration of files to packages



On Mon, Nov 20, 2000 at 11:15:54AM -0600, Steve Greenland wrote:
> On 20-Nov-00, 09:06 (CST), Anthony Towns <aj@azure.humbug.org.au> wrote: 
> > Mirror as in duplicate, separately. Something like:
> > /var/lib/dpkg/info/
> > 	base-passwd.extrafiles:
> > 		/etc/passwd
> > 	dpkg.extrafiles:
> > 		/etc/alternatives/*
> > 	nvi.extrafiles:
> > 		/usr/bin/vi
> > 	vim.extrafiles:
> > 		/usr/bin/vi
> So if I had both vim and nvi installed, what does dpkg -S /usr/bin/vi
> return?

All the packages involved in the vi alternatives. Compare and contrast
with `dpkg -S /usr/lib', say.

> The advantage of a "dpkg-register" is that update-alternatives
> could call it too.

It'd have to do something like:

	PKG=`dpkg -S /usr/bin/vim | sed 's/:.*//'`
	dpkg-register /usr/bin/vi $PKG

to deal with that, and it probably wouldn't cope well if you manually
changed which alternative was being used (which is done by manually ln
-sf'ing over the /etc/alternatives link, iirc).

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

  ``We reject: kings, presidents, and voting.
                 We believe in: rough consensus and working code.''
                                      -- Dave Clark

Attachment: pgpfyVz0aRZ8s.pgp
Description: PGP signature


Reply to: