Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

app-portage/cfg-update - installation instructions

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
249 posts
  • Page 3 of 10
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 10
  • Next
Author
Message
pross
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Jul 30, 2003 11:38 am
Location: Ireland

  • Quote

Post by pross » Sat Feb 14, 2004 9:54 am

did u delete the file from /usr/portage/distfiles too?
My Overlay [pross] | bfs-sources
Top
infamousmrsatan
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 08, 2004 12:06 pm
Location: California

  • Quote

Post by infamousmrsatan » Sat Feb 14, 2004 9:20 pm

hmm.. maybe not. let me try that.
Registered Linux User 344425
Join the adopt an unanswered post initiative today!
Por favor, corrija mi espanol!
Top
infamousmrsatan
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 08, 2004 12:06 pm
Location: California

  • Quote

Post by infamousmrsatan » Sat Feb 14, 2004 9:25 pm

Wait, there shouldn't be any /usr/portage distfiles should there? because the portage overlay is set, it looks in /usr/local/portage/app-portage/cfg-update.

I deleted the contents of that folder, and re-downloaded the ebuild from this forum, and that should take care of things, right? Do I have to unmerge first, and THEN get the new ebuild??
Registered Linux User 344425
Join the adopt an unanswered post initiative today!
Por favor, corrija mi espanol!
Top
pross
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Jul 30, 2003 11:38 am
Location: Ireland

  • Quote

Post by pross » Sat Feb 14, 2004 10:13 pm

regardless of whether you are using overlay or not...the source is downloaded to /usr/portage/distfiles/ take a look for yourself...
My Overlay [pross] | bfs-sources
Top
infamousmrsatan
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 08, 2004 12:06 pm
Location: California

  • Quote

Post by infamousmrsatan » Sun Feb 15, 2004 12:54 am

Ok, you were right. I didn't realize where the tarballs were stored. Thanks!

Now cfg-update recognizes the 128 or so files that need updating, but I get another problem... when I type 'y' indicating that I would like to update a particular file, cfg-update doesn't open xxdiff. Here's the output I get:

Code: Select all

enigma justin # cfg-update -u

(1/123)  /etc/ssl/misc/CA.pl  [modified]
Update file : /etc/ssl/misc/CA.pl ? [y|n|q|?] y
 (GUI tool) : when done, use the save button with the M on it !
 (GUI tool) : you have not saved your selections as /etc/ssl/misc/CA.pl.merge !
Update cancelled...

(2/123)  /etc/ssl/openssl.cnf  [modified]
Update file : /etc/ssl/openssl.cnf ? [y|n|q|?] q
Any ideas (I will look around on the forums elsewhere too)

Man this has install has had so many pitfalls....

EDIT: SOLUTION
Turns out that it was one of the problems mentioned in the first troubleshooting section, about not being able to connect to x-server. It wasn't giving me any error that indicated that, but when I tried using xxdiff independently of cfg-update, the error became aparent. Whew!!

Thanks everyone for your help.

Justin :wink:
Registered Linux User 344425
Join the adopt an unanswered post initiative today!
Por favor, corrija mi espanol!
Top
yuza
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Wed Dec 17, 2003 7:40 pm
Location: Rome, in front of my comp...

  • Quote

Post by yuza » Mon Feb 16, 2004 9:49 pm

I've just discovered a little problem with etc-update. Since it sets an alias for emerge in /etc/profile, you won't be able to set enviromental variables for portage anymore.
Things like
USE="something" emerge or
ACCEPT_KEYWORDS="~x86"
won't work anymore (at least with cfg-update-1.5)
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Tue Feb 17, 2004 6:33 pm

yuza wrote:I've just discovered a little problem with etc-update. Since it sets an alias
for emerge in /etc/profile, you won't be able to set enviromental variables
for portage anymore.
Things like
USE="something" emerge or
ACCEPT_KEYWORDS="~x86"
won't work anymore (at least with cfg-update-1.5)
I have never noticed that... Thanks for telling me this!

You can temporarily switch off the alias by typing:

Code: Select all

cfg-update --off
source /etc/profile
Then do your emerge with USE flags, and restore the alias afterwards with:

Code: Select all

cfg-update --on
source /etc/profile
Last edited by xentric on Fri Feb 20, 2004 1:24 pm, edited 1 time in total.
When all else fails, read the manual...
Registered Linux User #340626
Top
yuza
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Wed Dec 17, 2003 7:40 pm
Location: Rome, in front of my comp...

  • Quote

Post by yuza » Wed Feb 18, 2004 1:09 am

Thanks for the trick!
Top
micron
Guru
Guru
User avatar
Posts: 411
Joined: Wed Jul 23, 2003 9:42 am
Location: Bergamo, Italy
Contact:
Contact micron
Website

  • Quote

Post by micron » Thu Feb 19, 2004 3:45 pm

It's really a great job xentric, you've saved me! :D
My etc-config segfaulted and I wasn't able to update my conf files, but now... :wink:
Thanks a lot!
~ "Progress is merely a realisation of utopias" ~
Top
infamousmrsatan
Apprentice
Apprentice
User avatar
Posts: 201
Joined: Thu Jan 08, 2004 12:06 pm
Location: California

  • Quote

Post by infamousmrsatan » Thu Feb 19, 2004 4:30 pm

Right! I don't know if I ever said this, but now that I got it working, I am very very happy with cfg-update. Updated those 120 or so config files in what seemed like no time at all. :D

So as for turning the /etc/profiles thing --on and --off... when should you have to do this? Only when you want to declare an ACCEPT_KEYWORDS= or a USE= on the command line during an emerge?? Could it have an effect on anything else??

JS
Registered Linux User 344425
Join the adopt an unanswered post initiative today!
Por favor, corrija mi espanol!
Top
yuza
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Wed Dec 17, 2003 7:40 pm
Location: Rome, in front of my comp...

  • Quote

Post by yuza » Thu Feb 19, 2004 11:52 pm

Yes the problem is only when yuo are trying to set variables on the command line. I don't think it could have side effects on anything else.... xentric would have said that!
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Fri Feb 20, 2004 2:15 pm

yuza wrote:Yes the problem is only when you are trying to set variables on the command line. I don't think it could have side effects on anything else...
Yes, the problem lies in the use of the alias. It doesn't handle variables
infront of a command. I have not yet encountered any other side-effects
and I don't expect them either.

I really want to thank you guys for the suggestions, support and bugreports!
I'm glad the script does what it was intended to do, making configuration
updates easy...

I do not have lot's of spare time, but I will keep fixing the bugs as soon as
you guys report them and I really hope that the script finally ends up in the
portage tree because updating the "updating-tool" is a pain right now.
When all else fails, read the manual...
Registered Linux User #340626
Top
yuza
Apprentice
Apprentice
User avatar
Posts: 210
Joined: Wed Dec 17, 2003 7:40 pm
Location: Rome, in front of my comp...

  • Quote

Post by yuza » Sat Feb 21, 2004 1:15 am

I really hope that the script finally ends up in the portage tree
I'll keep my finger crossed!! :wink:
Top
chutz
n00b
n00b
Posts: 25
Joined: Mon Feb 03, 2003 11:26 pm
Location: Sapporo
Contact:
Contact chutz
Website

  • Quote

Post by chutz » Sun Feb 22, 2004 11:10 am

I decided to try cfg-update 1.6 for the first time, and it is incredibly slow when it tried to create the index for the first time. It seems the problem is that grep is too slow. I adjusted the code like this:

Code: Select all

--- cfg-update.pl   2004-02-13 02:20:47.000000000 +0900
+++ /usr/bin/cfg-update 2004-02-22 20:01:31.337632101 +0900
@@ -239,7 +239,7 @@
 }

 sub build_big{
-    `cat /var/db/pkg/*/*/CONTENTS | grep '^obj ' | awk '{ print \$2"  "\$3 }' >>$index`;
+    `cat /var/db/pkg/*/*/CONTENTS | awk '/^obj / { print \$2"  "\$3 }' >>$index`;
 }

 sub build_small{
and here is the result.

Patched version:

Code: Select all

# date; cfg-update --index; date
Sun Feb 22 19:54:57 JST 2004
Use of uninitialized value in pattern match (m//) at /usr/bin/cfg-update line 271.
________________________________________________________________________________

cfg-update 1.6 : Building checksum index... (takes a few seconds)  done!
________________________________________________________________________________

Sun Feb 22 19:54:59 JST 2004
Original version:

Code: Select all

date; cfg-update --index; date
Sun Feb 22 19:56:04 JST 2004
Use of uninitialized value in pattern match (m//) at /usr/bin/cfg-update line 271.
________________________________________________________________________________

cfg-update 1.6 : Building checksum index... (takes a few seconds)  done!
________________________________________________________________________________

Sun Feb 22 20:01:54 JST 2004
I believe that cfg-update could benefit from removing the pipe to grep in all locations where there is pipe to awk as well. I.e. something like the following:

Code: Select all

--- /var/tmp/portage/cfg-update-1.6/work/cfg-update-1.6/cfg-update.pl   2004-02-13 02:20:47.000000000 +0900
+++ /usr/lib/cfg-update/cfg-update.pl   2004-02-22 20:08:20.993712690 +0900
@@ -239,12 +239,12 @@
 }
 
 sub build_big{
-    `cat /var/db/pkg/*/*/CONTENTS | grep '^obj ' | awk '{ print \$2"  "\$3 }' >>$index`;
+    `cat /var/db/pkg/*/*/CONTENTS | awk '/^obj / { print \$2"  "\$3 }' >>$index`;
 }
 
 sub build_small{
     for (my $i = 0; $i < @dir; ++$i) {
-        `cat /var/db/pkg/*/*/CONTENTS | grep '^obj $dir[$i]' | awk '{ print \$2"  "\$3 }' >>$index`;
+        `cat /var/db/pkg/*/*/CONTENTS | awk '/^obj $dir[$i]/ { print \$2"  "\$3 }' >>$index`;
     }
 }
 
@@ -279,7 +279,7 @@
        if (-f "$index") {
         my $md5sum_file = `md5sum $file1 2>/dev/null | awk '{ print \$1 }' 2>/dev/null`;
         chomp $md5sum_file;
-        my $md5sum_index = `cat $index | grep $file1 | awk '{ print \$2 }' 2>/dev/null`;
+        my $md5sum_index = `cat $index | awk '/$file1/ { print \$2 }' 2>/dev/null`;
         chomp $md5sum_index;
                if ($md5sum_index =~ /.+/) {
             if ($md5sum_index !~ $md5sum_file) {
Top
chutz
n00b
n00b
Posts: 25
Joined: Mon Feb 03, 2003 11:26 pm
Location: Sapporo
Contact:
Contact chutz
Website

  • Quote

Post by chutz » Sun Feb 22, 2004 11:17 am

Another whine. This ebuild is now spending quality time on "Converting old backups to new filename format....". No issues with that, but it is now searching my NFS mounted file systems that have a LOT of files... and it is of course not very fast. Not a very good impression for a first-time install.
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Thu Feb 26, 2004 8:17 pm

I have changed the ebuild and conversion to the new format has to be done
manually now with the script provided in the ebuild... This way new installs and
already converted installs won't waste "quality time" :)

Code: Select all

root@xentric 56C xentric $ time cfg-update --index
________________________________________________________________________________

cfg-update 1.6 : Building checksum index... (takes a few seconds)  done!
________________________________________________________________________________


real    0m12.558s
user    0m1.461s
sys     0m0.737s
I don't know how many packages you have on your system, what filesystem you use or what
other factors can make the index-building so slow... The above is a test on my machine, a
Pentium3 850Mhz with Reiserfs. But I didn't notice significant speed changes on my old
Pentium1 233Mhz system.

I don't have time right now to test your patch, but if I look at your tests I think it will make
it into the next ebuild if it's faster on my machine too. Please remember that this is a small
script that has kinda grown out of proportion. It's a hack to make a safer etc-update, but
right now I have very limited time to spend on this project... sorry for that :( I'm doing what
I can to make it usable and keep it usable!
When all else fails, read the manual...
Registered Linux User #340626
Top
St_Andrew
n00b
n00b
Posts: 37
Joined: Sat Feb 07, 2004 5:58 pm

  • Quote

Post by St_Andrew » Tue Mar 23, 2004 1:23 pm

thanks a lot for this script man, has helped me a lot :)
Top
rudyfink
n00b
n00b
Posts: 11
Joined: Tue Sep 10, 2002 8:55 am
Location: Houston, TX (yee-haww!!)

Nice

  • Quote

Post by rudyfink » Mon Jun 14, 2004 6:15 am

This is what I was looking for.

I'm very suprised the default merge tool doesn't have the graphical option as it's "merge interactively" section.
Top
BlindSpy
Apprentice
Apprentice
User avatar
Posts: 263
Joined: Sat Mar 20, 2004 4:17 pm

  • Quote

Post by BlindSpy » Mon Jun 14, 2004 12:35 pm

AWESOME program!
Top
yngwin
Retired Dev
Retired Dev
User avatar
Posts: 4572
Joined: Thu Dec 19, 2002 1:22 pm
Location: Suzhou, China

  • Quote

Post by yngwin » Wed Jul 21, 2004 1:05 pm

Just a note: textutils is now part of coreutils, you should update the ebuild!
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Thu Jul 22, 2004 9:27 pm

yngwin wrote:Just a note: textutils is now part of coreutils, you should update the ebuild!
Thanks for reporting this. I have updated the ebuild but I have no way
of testing it because my Gentoo system died after loosing the /var partition.
Can someone please test if the new ebuild works without problems?
(see first post, the link to the ebuild points to the updated version)
When all else fails, read the manual...
Registered Linux User #340626
Top
ndbruin
n00b
n00b
Posts: 15
Joined: Mon Jul 14, 2003 11:41 am

  • Quote

Post by ndbruin » Mon Jan 03, 2005 11:53 am

After I installed cfg-update I get the following error messages after starting cfg-update -u:

Use of uninitialized value in substitution (s///) at /usr/bin/cfg-update line 191.
Use of uninitialized value in pattern match (m//) at /usr/bin/cfg-update line 192.

The program works, but I am not sure if it will work properly.
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Tue Jan 04, 2005 4:51 pm

ndbruin wrote:The program works, but I am not sure if it will work properly.
The warnings just show that a (s///) replace and a (m//) match are done
on an empty variable. If we take a look at lines 191 and 192:

Code: Select all

190    $_ = $ENV{'CONFIG_PROTECT'};
191    s/"//g;                                                               # strip " chars
192    until ($_ =~ /^$/) {
We can see that the environmental variable CONFIG_PROTECT is empty.
You can verify this with the 'env' command on the commandline.
As I recall correctly this value is set in /etc/make.globals, just check with
the following command:

Code: Select all

root@gentoo 45C xentric $ grep -H "CONFIG_PROTECT" /etc/*
/etc/csh.env:setenv CONFIG_PROTECT '/usr/X11R6/lib/X11/xkb
 /usr/kde/3.3/share/config /usr/kde/3.3/env /usr/kde/3.3/shutdown
 /usr/share/config'

/etc/csh.env:setenv CONFIG_PROTECT_MASK '/etc/terminfo'

/etc/make.globals:CONFIG_PROTECT="/etc /var/qmail/control
 /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"

/etc/make.globals:CONFIG_PROTECT_MASK="/etc/gconf"

/etc/profile.env:export CONFIG_PROTECT='/usr/X11R6/lib/X11/xkb
 /usr/kde/3.3/share/config /usr/kde/3.3/env /usr/kde/3.3/shutdown
 /usr/share/config'

/etc/profile.env:export CONFIG_PROTECT_MASK='/etc/terminfo'
As you can see the CONFIG_PROTECT variable is actually set in 3 different
locations on my system...
/etc/csh.env
/etc/make.globals
/etc/profile.env

Maybe your system is missing some of these files!? cfg-update will work
correctly but if that variable isn't set anywhere it probably means that
portage has no protected directories and instead of making a ._cfg0000_
file it will just overwrite the original file without a warning...

So that's a bad thing !

The CONFIG_PROTECT variable on my system looks like this:

Code: Select all

root@gentoo 43C xentric $ env | grep "CONFIG_PROTECT"
CONFIG_PROTECT_MASK=/etc/terminfo
CONFIG_PROTECT=/usr/X11R6/lib/X11/xkb /usr/kde/3.3/share/config /usr/kde/3.3/env /usr/kde/3.3/shutdown /usr/share/config
Maybe you can fix things with the above info...
When all else fails, read the manual...
Registered Linux User #340626
Top
gentsquash
l33t
l33t
Posts: 753
Joined: Wed Nov 03, 2004 7:36 pm
Location: Still a Gentoo beginner.
Contact:
Contact gentsquash
Website

  • Quote

Post by gentsquash » Fri Jan 07, 2005 8:38 pm

When cfg-update is finally in portage, will its full name be

Code: Select all

sys-apps/cfg-update
or will it be part of "sys-apps/portage", as "etc-update" is
currently?

And when will it be `emerge'able?
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Sat Jan 08, 2005 6:10 pm

I have no idea if it will be accepted as I don't get replies on my
mails from the devs... This is the way gentoo bugzilla works:
Granted, plenty of ebuilds sit in there and never make it into the tree.
This is not the fault of bugzilla, however. It is more a problem with our
process. Ebuilds make it into the tree when a developer cares about them.
If no developer cares about them, they tend not to make it into the tree.
For right or wrong, that's how things work today.
You can check the status of this package here (or possibly
post a comment that you want it in the portage tree, maybe
that helps?):
http://bugs.gentoo.org/show_bug.cgi?id=32728
When all else fails, read the manual...
Registered Linux User #340626
Top
Post Reply

249 posts
  • Page 3 of 10
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 10
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy