Gentoo Archives: gentoo-user

From: Justin Findlay <justin@××××××××.us>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] etc-update: what's the meaning of "using_editor" setting?
Date: Sat, 09 Sep 2006 22:42:38
Message-Id: 20060909220824.GA7790@archimedes
In Reply to: [gentoo-user] etc-update: what's the meaning of "using_editor" setting? by Alexander Skwar
1 On AD 2006 September 09 Saturday 11:06:21 PM +0200, Alexander Skwar wrote:
2 > Hello!
3 >
4 > In /etc/etc-update.conf, there's the "using_editor=" (with 0 and 1,
5 > for false and true) setting.
6 >
7 > What's that supposed to mean? What does it do? When should
8 > it be set to 1 (true) and when to 0? What's an editor? Or,
9 > more directly, I'd like to use "meld" as the diff_command
10 > tool - do I need to set using_editor=1 or =0?
11
12 >From /usr/sbin/etc-update, which is a symlink to
13 /usr/lib/portage/bin/etc-update, the only reference to 'using_editor' is
14 on line 483. Here is some context:
15
16 function do_cfg() {
17 ...
18 showdiffcmd=$(echo "${diff_command}" |
19 sed -e "s:%file1:${ofile}:" -e "s:%file2:${file}:")
20
21 if [ "${using_editor}" == 0 ]; then
22 (
23 echo "Showing differences between ${ofile} and ${file}"
24 ${showdiffcmd}
25 ) | ${pager}
26 else
27 echo "Beginning of differences between ${ofile} and ${file}"
28 ${showdiffcmd}
29 echo "End of differences between ${ofile} and ${file}"
30 fi
31
32 Basically it looks like if you have a pager set then you're 'using an
33 editor' otherwise it doesn't expect a pager. Seems like a redundant
34 config to me.
35
36
37 Justin
38
39 --
40 You have 1 Moderator Point! Use it or lose it!
41 --
42 gentoo-user@g.o mailing list