FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 08-03-2011, 09:49 AM
Thorsten Glaser
 
Default editorrc as update-alternatives slave

Dear dpkg developers,

something came up with update-alternatives, and we would like to ask
you about whether this can possibly work. Context:

Dixi quod…

>Josip Rodin dixit:

>>We would want editorrc to depend on editor in some way, since that is indeed
>>logical, but IIRC you can't just invent new slaves to editor out of the blue
>>and expect other editor alternatives to play along - they wouldn't know how.
>
>Hm, these other editors could just have it dangling.
[…]
>Parallel to that, we ask the dpkg people if we can move to a
>slave, and include that in the upload if possible (since I've
>fixed it "for now", that upload isn't time critical).


At the moment, update-alternatives manages 'editor' which
consists of a binary symlink and one slave, being its
manpage symlink. For the editors joe and jupp, there is
also the 'editorrc' alternative which must also be set,
because they look up argv[0]+"rc" as configuration file
to use.

Could we add /var/lib/misc/editorrc (the new agreed-on
path for editorrc shared across jupp and joe) as slave
to update-alternatives for editor? Editors that don't
use it, like vi and nano, need then not define it and
will just have /var/lib/misc/editorrc dangling (or be
nonexistant), while editors that do define it (like joe,
jupp, and their variants jstar, jmacs, jpico, etc.) have
a symlink there which points to /etc/joe/joerc and so on,
depending on the editor choice.

Thanks in advance,
//mirabilos
--
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence. -- Coywolf Qi Hunt


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: Pine.BSM.4.64L.1108030944390.4547@herc.mirbsd.org" >http://lists.debian.org/Pine.BSM.4.64L.1108030944390.4547@herc.mirbsd.org
 
Old 08-03-2011, 12:14 PM
Raphael Hertzog
 
Default editorrc as update-alternatives slave

Hello,

On Wed, 03 Aug 2011, Thorsten Glaser wrote:
> Could we add /var/lib/misc/editorrc (the new agreed-on
> path for editorrc shared across jupp and joe) as slave
> to update-alternatives for editor?

Yes you can.

(But it's a bit weird that those editors do not use their canonical name
to find their configuration file and instead rely on argv[0]...)

> Editors that don't
> use it, like vi and nano, need then not define it and
> will just have /var/lib/misc/editorrc dangling (or be
> nonexistant), while editors that do define it (like joe,
> jupp, and their variants jstar, jmacs, jpico, etc.) have
> a symlink there which points to /etc/joe/joerc and so on,
> depending on the editor choice.

When an alternative doesn't provide a slave, u-a drops the symlink (i.e.
it will not be dangling).

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: 20110803121410.GB32515@rivendell.home.ouaza.com">h ttp://lists.debian.org/20110803121410.GB32515@rivendell.home.ouaza.com
 
Old 08-03-2011, 01:08 PM
Thorsten Glaser
 
Default editorrc as update-alternatives slave

Raphael Hertzog dixit:

>Yes you can.

Thanks!

>(But it's a bit weird that those editors do not use their canonical name
>to find their configuration file and instead rely on argv[0]...)

The idea is: you get one binary, /usr/bin/joe in the joe package
(similar for jupp), and some symlinks /usr/bin/{jmacs,jstar,jpico,...}
to it. The binary then looks at its called name to determine which
of the /etc/joe/*rc files to load.

>When an alternative doesn't provide a slave, u-a drops the symlink (i.e.
>it will not be dangling).

OK. Will do it like that, then.

bye,
//mirabilos
--
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font. -- Rob Pike in "Notes on Programming in C"


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: Pine.BSM.4.64L.1108031306550.9481@herc.mirbsd.org" >http://lists.debian.org/Pine.BSM.4.64L.1108031306550.9481@herc.mirbsd.org
 

Thread Tools




All times are GMT. The time now is 03:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org