Hi,

> > ~$ dpkg -S usr/bin/ctags
> > exuberant-ctags: /usr/bin/ctags-exuberant
> > ~$ dpkg -S /usr/bin/ctags
> > dpkg: /usr/bin/ctags not found.
> > ~$ dpkg -S '/usr/bin/ctags*'
> > exuberant-ctags: /usr/bin/ctags-exuberant
...
> > The behavior change with leading "/" is different issue from
> > alternative symlinks.   It was just sheer luck of matching string
> > which picked /usr/bin/ctags-exuberant.
> 
> Indeed. To convince myself I did the search with usr/bin/editor and 
> effectively, it doesn't work here, according to manual.

Why you say "it doesn't work here"?  It is alternative so following
should be shown as expected. 

$ dpkg -S bin/editor
dpkg: *bin/editor* not found.

This is corect response per manual: dpkg-query(1).  "This command will
not list extra files created by maintainer scripts, nor will it list
alternatives."

> The last point I don't understand is why it do work with ctags which is 
> an alternative. Is the packaging of this alternative (and firefox) 
> different from those of editor alternative ?

They use the same method.  But each package comes with different
combination of names.

When you run 
 ~$ dpkg -S usr/bin/ctags
it does substring match with "usr/bin/ctags" as I said which happens to
pick up one of the installed package /usr/bin/ctags-exuberant (and this
happen to be alternative but any substring matched installed file name
could be picked). 

What you are doing here has nothing to do with alternative.  No symlinks
created by alternative system is printed out by dpkg -S.

...
> > If you think searching alternatives is important, I guess you need to
> > write tool for it.  For installed packges,
> >
> > /var/lib/dpkg/alternatives$ grep ctags *
> > ctags:/usr/bin/ctags
...
> > is what I do to find such.

Just to fill gap: I find that /var/lib/dpkg/alternatives/ctags has
/usr/bin/ctags alternative defined via this acton.

For actual alternative setting, you nee to look into:
/var/lib/dpkg/alternatives/editor
/var/lib/dpkg/alternatives/ctags

Each file define alternative setting.  That is how you find alternative.

Please read dpkg-query(1) manpage and update-alternatives(8) manpage.

Osamu


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

Reply via email to