Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Graphical etc-update
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Tue Feb 11, 2003 4:19 am    Post subject: Reply with quote

I have to say, I don't really understand the concept of DIFF_COMMAND and MERGE_COMMAND. I can put kompare in the DIFF_COMMAND ok, but then what? What do I have to do to make it write the changes, write some of the changes or discard the whole file?

Can somebody please explain?
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Tue Feb 11, 2003 4:28 am    Post subject: Reply with quote

the original idea was that the diff_command would just run diff and show you the changes. then the merge_command would be some sort of interactive program to merge the changes together.

I just use gvim -d as the diff command then I can see the diff and perform the merge at the same time in my favorite text editing environment. then I never invoke the merge command from the etc-update command. I just write whatever tweaks I want to one of the files and then use options 1 and 2 from the etc-update menu.
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Tue Feb 11, 2003 4:37 am    Post subject: Reply with quote

Ah! Brilliant!

Thanks alot zojas
Back to top
View user's profile Send private message
metal
n00b
n00b


Joined: 01 Oct 2002
Posts: 36
Location: Spain

PostPosted: Tue Feb 11, 2003 8:10 pm    Post subject: Reply with quote

KDE users might want to use kdiff3, which have a -m (merge) and a -o (output file) command line option, but I haven't tried it yet.
Back to top
View user's profile Send private message
idiotprogrammer
Apprentice
Apprentice


Joined: 29 Jul 2002
Posts: 179
Location: Texas

PostPosted: Fri Feb 21, 2003 5:39 am    Post subject: problems with gtkdiff Reply with quote

Well, the idea of using a diff gui sounds awfully appealing.

But ...

even after trying the etc-update changes to tell it to use gtkdiff, it causes a seg fault. (I am just using X, not a fancy window manager though).

Also, I noticed that gtkdiff doesn't allow you to see files starting with a period, which by the way, is how almost all of the config files are.

So unless there's a command line that allows gtkdiff to make . files visible, then the gui is mostly useless.

rj
Back to top
View user's profile Send private message
Bemke
n00b
n00b


Joined: 18 Feb 2003
Posts: 2

PostPosted: Sat Mar 01, 2003 12:45 am    Post subject: Reply with quote

I dont like etc-updates UI, it takes to much time... I use a simple script instead :)

$ cat etc-diff

if [ "$1" == "" ]
then
echo etc-diff file1 [file2]
exit
fi

f1=$1
f2=$2
if [ "$2" == "" ]

then
f1=$1
f2=`echo $f1 | awk '{print gensub("._cfg0000_", "", "g", $1)}'`
fi

diff -b -B "$f1" "$f2" |grep '[<>]'|grep -v '< #'|grep -v '> #'
echo "Overwrite $f2 with $f1?";read i
if [ "$i" = "y" ]
then
mv "$f1" "$f2"
echo $f2 is overwritten with $f1
else
echo "Delete $f1?";read i
if [ "$i" = "y" ]
then
rm -f "$f1"
echo "$f1 deleted!"
fi
fi
Back to top
View user's profile Send private message
fbreuer
n00b
n00b


Joined: 04 Oct 2002
Posts: 47
Location: Berlin, Germany

PostPosted: Mon Jun 23, 2003 5:14 pm    Post subject: Reply with quote

Another nice program for graphical diff'ing (for use with Gnome 2 for example) is meld. See http://meld.sourceforge.net and try
Code:
emerge -p meld
Back to top
View user's profile Send private message
Belgabor
n00b
n00b


Joined: 03 Jul 2003
Posts: 63
Location: Germany

PostPosted: Sat Aug 09, 2003 7:49 pm    Post subject: Reply with quote

meld looks sweet but unfortunately its useless for merges or diffs that include a lot of whitespace change (it lacks the option to ignore whitespace).

I currently use xxdiff for etc-update using the following lines:
diff_command="xxdiff --style keramik %file1 %file2"
merge_command="xxdiff -m --resource 'Show.PaneMergedView:true' --style keramik -O -M %merged %orig %new"
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Sat Aug 09, 2003 8:08 pm    Post subject: Reply with quote

I've been using xxdiff too. Works great.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
rjtupas
n00b
n00b


Joined: 26 Jul 2003
Posts: 59
Location: Coronado, CA USA

PostPosted: Sat Aug 16, 2003 6:27 am    Post subject: What about "using_editor=0" Reply with quote

I've made the changes discussed in the first post. Do I need to edit the "using_editor=0" line in /etc/etc-config if I am using gtkdiff?
TIA,

Randy
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Thu Oct 16, 2003 1:53 am    Post subject: Reply with quote

Tkdiffb, which is part of the tkcvs package, makes a nice graphical merge tool, and it integrates well with etc-update.

Although I have to say, I like the way meld works - a bit confusing at first, but the linked scrolling is pure magic! :)
Back to top
View user's profile Send private message
Lasitus
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 188
Location: Orlando, FL

PostPosted: Mon Feb 07, 2005 10:56 pm    Post subject: Reply with quote

Great idea! I have been wanting this but didn't looked into it personally. I got it to open etc-update as my user, but I don't have rights to write the file. (BTW, I am using kompare)
Code:
xhost +localhost

doesn't work for me. I have tried various things from setting the XAUTHORITY variable to the DISPLAY variable. From what it sounds like on this post, xhost +localhost should work. (No matter what I have tried, root cannot use the display)

I am using:
Code:
sudo su -

to switch to root before running etc-update. I have also tried
Code:
DISPLAY=":0.0" sudo etc-update


What am I missing?
Back to top
View user's profile Send private message
Lasitus
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 188
Location: Orlando, FL

PostPosted: Wed Feb 09, 2005 5:16 pm    Post subject: Reply with quote

Hmm, didn't notice this post was from 2003... Well I got it display kompare by not using sudo. I got a whole mess of errors though it seemed to work.
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Feb 09, 2005 7:27 pm    Post subject: Reply with quote

The user who started X should run "xhost +localhost" and that user should
also belong to the wheel group, otherwise he/she cannot su to root.

You could also try sux (emerge sux) instead of su! I've heard from lot's of
people that sux just works when su fails under X.
_________________
When all else fails, read the manual...
Registered Linux User #340626
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Feb 09, 2005 7:27 pm    Post subject: Reply with quote

double...
_________________
When all else fails, read the manual...
Registered Linux User #340626
Back to top
View user's profile Send private message
Lasitus
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 188
Location: Orlando, FL

PostPosted: Fri Feb 11, 2005 1:58 am    Post subject: Reply with quote

Yeah, I wasn't in the wheel group. I was using:
Code:
sudo su -

to change over to root. After joining the wheel group and just doing this instead:
Code:
su -

I was able to get it to work. The only thing is kompare gave some gui related errors as root. It did seem to work ok though.
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Fri Feb 11, 2005 2:02 am    Post subject: Reply with quote

Why don´t you use dispatch-conf? If you emerge app-text/rcs you will have a complete history of your config files at your hand... :?: :?
Back to top
View user's profile Send private message
FreeManAtomic
Guru
Guru


Joined: 01 Feb 2005
Posts: 365

PostPosted: Wed Apr 13, 2005 7:36 pm    Post subject: Reply with quote

Hi,
I done the changes, but don't work.
When start the etc-update command i always see a text-version :roll:

Sorry for my english :)
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Wed Apr 27, 2005 6:23 pm    Post subject: Reply with quote

Hello,

I tried the things from the 1st Posting ...


but I always get :

eg. /usr/sbin/etc-update: line 242: "gtkdiff: command not found


Why

R R
Back to top
View user's profile Send private message
its1louder
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2003
Posts: 75
Location: Santa Barbara CA

PostPosted: Mon May 16, 2005 7:25 pm    Post subject: Reply with quote

Tinitus wrote:

but I always get :

eg. /usr/sbin/etc-update: line 242: "gtkdiff: command not found

n

R R


I have this problem too. I can't figure it out. I tried using meld and gtkdiff. I also tried copying meld and gtkdiff to the /usr/sbin/ directory and also putting in line 242 /usr/bin/meld instead of just meld. Neither worked. Sure wish they did.
_________________
These go to eleven.
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Fri May 20, 2005 1:56 am    Post subject: Reply with quote

j-m wrote:
Why don´t you use dispatch-conf? If you emerge app-text/rcs you will have a complete history of your config files at your hand... :?: :?


could you expand a little about what you use?
I have used dispatch -conf but it is also a command line utility.
I am really all for a GUI interface to make config file updating much more intuitive.
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Fri May 20, 2005 5:48 am    Post subject: Reply with quote

Quote:
I am really all for a GUI interface to make config file updating much more intuitive.

You can try app-portage/cfg-update for GUI updating of your config files...
Just read the install instructions and don't forget to run "cfg-update --fix" if you
have problems starting the GUI tools as root.
The next version (1.8) will also support 3-way merging with GUI tools, so it
can auto-update a lot more.
_________________
When all else fails, read the manual...
Registered Linux User #340626
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Mon May 23, 2005 11:50 am    Post subject: Reply with quote

thank you
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum