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 5 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 10
  • Next
Author
Message
neerolyte
n00b
n00b
Posts: 44
Joined: Fri Jun 04, 2004 12:47 am
Location: Melbourne, Australia

  • Quote

Post by neerolyte » Wed Jun 15, 2005 2:10 am

i rather like this, can we have this as the default now?
Top
sfp-a7x
n00b
n00b
Posts: 47
Joined: Tue Nov 16, 2004 1:20 am

  • Quote

Post by sfp-a7x » Mon Jul 04, 2005 5:59 pm

Rather than making the alias for emerge in /etc/profile, why not add a file in /etc/env.d and run env-update?

Is /etc/env.d is only for environment variables?
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Mon Jul 04, 2005 8:43 pm

sfp-a7x wrote:Rather than making the alias for emerge in /etc/profile, why not add a file in /etc/env.d and run env-update?
Is /etc/env.d is only for environment variables?
Well, I have never tried to set an alias from there...
When all else fails, read the manual...
Registered Linux User #340626
Top
wolfbite_aus
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Jan 19, 2005 2:48 am

  • Quote

Post by wolfbite_aus » Sat Jul 16, 2005 10:50 am

Am I missing something?

I would like to be able to do cfg-update -cfg and just make the _cfg file the new one automaticlly (usually if I've done a pile of emerge's.

Also

is it possable to get cfg-update to ignore a particular file?
say edit the first line
#cfg-update false
and cfg-update would just ignore (because your always playing with it? or you do a manual diff but its an added precaution)

Thanks for any help
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Sun Jul 17, 2005 9:00 am

wolfbite_aus wrote:I would like to be able to do cfg-update -cfg and just make the _cfg file the new one automaticlly (usually if I've done a pile of emerge's.
If you do a "cfg-update -l" it'll show you which files have ._cfg0000_files and need to be updated. It will also show the status of these files (modified, unmodified, unknown, etc). The first priority of cfg-update is to let you safely update your system. This means that the status of a file has a direct effect on the way cfg-update handles that particular file. If a file has been changed after it was installed by portage, it probably means that you, a system process or a program have put settings in that file so cfg-update will never simply overwrite the current (modified) file with the ._cfg0000_file. It will force you to manually merge this file in the diff/merge tool of your choice!

If you have just installed cfg-update you will probably have to manually merge all files with the diff/merge tool. This is because cfg-update cannot determine the status of the files yet. You need a checksum-index before cfg-update can automatically determine which files can be updated safely by overwriting them with the ._cfg000)_file. This checksum-index will be automatically created as soon as you have updated all files manually first...

So on the second update session cfg-update can use this index and it will be able to speed up the updating proces significantly because it will take care of all the (unmodified) files that don't need your attention!
is it possable to get cfg-update to ignore a particular file?
say edit the first line
#cfg-update false
and cfg-update would just ignore (because your always playing with it? or you do a manual diff but its an added precaution)
If you have added such a line to the file cfg-update will see that it has changed and will ask you what to do with it. Just choose [n]o to skip this file and go to the next file... or choose [y]es and update it manually in the diff/merge tool. It will never overwrite a modified file with the ._cfg0000_file!
When all else fails, read the manual...
Registered Linux User #340626
Top
piavlo
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Tue Jun 21, 2005 4:17 pm

  • Quote

Post by piavlo » Wed Jul 27, 2005 6:12 am

it seems like the cfg-update is not respecting CONFIG_PROTECT_MASK
could it be fixed?
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Thu Jul 28, 2005 5:26 am

piavlo wrote:it seems like the cfg-update is not respecting CONFIG_PROTECT_MASK
could it be fixed?
I will look into this... I'll keep you updated on the results.
When all else fails, read the manual...
Registered Linux User #340626
Top
NullDevice
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 84
Joined: Fri Jul 15, 2005 3:45 pm

  • Quote

Post by NullDevice » Thu Jul 28, 2005 8:41 am

Hey,

im new to cfg-update. Do i have to read all of the troubleshooting thread, like 100 posts.. or is there a simple users guide or howto to read?

Im scared to break my system, but i have 42 config file to be updated, according to portage.
MfG,
NullDevice
Top
NullDevice
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 84
Joined: Fri Jul 15, 2005 3:45 pm

  • Quote

Post by NullDevice » Thu Jul 28, 2005 10:14 am

ah, got it now, sryy i found it.
MfG,
NullDevice
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Thu Jul 28, 2005 7:27 pm

xentric wrote:
piavlo wrote:it seems like the cfg-update is not respecting CONFIG_PROTECT_MASK
could it be fixed?
I will look into this... I'll keep you updated on the results.
Hmm... after some thinking I came to this conclusion:

Portage uses CONFIG_PROTECT and CONFIG_PROTECT_MASK to determine which directories to protect and which directories in the protected directories can be excluded from protection. As a result, you will not get any ._cfg0000_files in the directories in CONFIG_PROTECT_MASK because these directories are excluded from the protection mechanism and all config files in these unprotected directories are automatically overwritten, by Portage, with the new version of that file.

So the fact that cfg-update doesn't exclude the directories in CONFIG_PROTECT_MASK while searching for ._cfg0000_files shouldn't matter as there shouldn't be any ._cfg0000_files in those directories anyway!
If cfg-update does find ._cfg0000_files in those dirs, you should start to wonder if Portage has a bug that causes it to ignore CONFIG_PROTECT_MASK.
When all else fails, read the manual...
Registered Linux User #340626
Top
rjmckee
n00b
n00b
User avatar
Posts: 9
Joined: Tue Jan 27, 2004 6:47 pm
Location: Vidalia

cfg-update

  • Quote

Post by rjmckee » Tue Aug 02, 2005 11:35 pm

Killer script! Thank you Xentric!
I had 26 files that needed updating and I was afraid after the last time I borked my system w/ etc-update.
Your script ran just fine.... no errors, system still runnung :-)
Regards and thanks again,
Ray
Top
alaskazimm
n00b
n00b
User avatar
Posts: 15
Joined: Sun Jul 17, 2005 11:29 pm
Location: California, but my heart's in Alaska

  • Quote

Post by alaskazimm » Thu Sep 08, 2005 8:50 pm

Oh man, thanks for all the work on this script! I came across this a couple of weeks ago and it is a *whole* lot easier than etc-update.

No problems on this end. I've used it to update numerous config files and it is sweet.

Thanks again
Top
GeYe
n00b
n00b
Posts: 32
Joined: Thu Sep 23, 2004 1:21 pm
Location: Germany
Contact:
Contact GeYe
Website

  • Quote

Post by GeYe » Mon Sep 12, 2005 6:03 am

I unmerge cfg-update and now this:

Code: Select all

bash: emerge_with_indexing_for_cfg-update: command not found
when I try to emerge.

How to solve this now, because I can't emerge anything now.
Top
leon_73
Guru
Guru
User avatar
Posts: 505
Joined: Thu Mar 13, 2003 2:08 pm
Location: Milano

  • Quote

Post by leon_73 » Mon Sep 12, 2005 7:23 am

GeYe wrote:I unmerge cfg-update and now this:

Code: Select all

bash: emerge_with_indexing_for_cfg-update: command not found
when I try to emerge.

How to solve this now, because I can't emerge anything now.
I'm not sure but try to see if you have some alias... and check the /etc/profiles file....

Leo
Top
GeYe
n00b
n00b
Posts: 32
Joined: Thu Sep 23, 2004 1:21 pm
Location: Germany
Contact:
Contact GeYe
Website

  • Quote

Post by GeYe » Mon Sep 12, 2005 3:58 pm

Yes in the file /etc/profiles were these lines:

Code: Select all

# cfg-update uses this alias to update it's checksum-index *before* emerging
alias emerge='emerge_with_indexing_for_cfg-update'
You need to delete the lines and run

Code: Select all

env-update 
and

Code: Select all

source /etc/profile
.

Thanks for this hint. Maybe the unmerge-script need an update :wink:
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Mon Sep 12, 2005 7:05 pm

GeYe wrote:Thanks for this hint. Maybe the unmerge-script need an update :wink:
Actualy, the problem is that on updating a package, the new package is installed first, then the old package get's unmerged. So if I turn off the alias in the unmerge routine of the ebuild, the new script isn't using the alias anymore.
In the next version I have already implemented a check that warns if the alias is disabled and it explains how you can turn it on again. This will make it possible to turn off the alias during unmerging... I'll put that in the 1.8.0 ebuild.
When all else fails, read the manual...
Registered Linux User #340626
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Wed Sep 14, 2005 7:27 pm

this is definitely nice. i've been using cfg-update for what, about a month now? i've noticed no problems, and defintely blows etc-update out of the water. i can rest knowing i won't have to redo my custom configs every time.

BTW, a tip for adding it to the KDE menu. Open the KDE Menu Editor (kmenuedit, and i believe the ebuild is kde-base/kmenuedit if you don't have it). expand either System or Utilities, wherever you want to put it, and hit ctrl-N for a new item. fill in the name and the command (cfg-update -u). select the "Run in terminal" and "Run as a different user" checkboxes. you don't have to enter anything for the user, as it defaults to root. you may also want to give it an intuitive icon.
Sheepdog
Why Risk It? | Samba Howto
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Wed Sep 14, 2005 9:45 pm

Sheepdogj15 wrote:BTW, a tip for adding it to the KDE menu....
Thanks for the tip, I didn't even think about that!
I have added the tip to the cfg-update installation instructions.
When all else fails, read the manual...
Registered Linux User #340626
Top
Sheepdogj15
Guru
Guru
User avatar
Posts: 430
Joined: Fri Jan 07, 2005 9:02 am
Location: Backyard
Contact:
Contact Sheepdogj15
Website

  • Quote

Post by Sheepdogj15 » Wed Sep 14, 2005 11:28 pm

no problem, man :)
Sheepdog
Why Risk It? | Samba Howto
Top
wolfbite_aus
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Jan 19, 2005 2:48 am

cfg-update abort codes??

  • Quote

Post by wolfbite_aus » Sat Sep 24, 2005 2:21 pm

maybe I missed it, maybe it doesnt exist

What I would like is, on the first line of the config to have say
#cfg_never
cfg_update would come up with a message saying
## You have requested to never modify this ????.conf
## Leaving the current ????.alone

is this possable? or already implemented.
(mainly for those blasted files I accidently update (yes I know I have a backup, but sometimes you miss something till you need it :)

and what about an -new flag
just update ALL conf with the newer one (BUT cfg_never still overides)

Great program otherwise :))
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

Re: cfg-update abort codes??

  • Quote

Post by xentric » Sat Sep 24, 2005 10:26 pm

wolfbite_aus wrote:## You have requested to never modify this ????.conf
## Leaving the current ????.alone
Well, I chose a different approach. It's not a good idea to ignore updates! I've made cfg-update auto-update all files that haven't been touched by you after they were installed. That way, you don't have to spend time on those files, but they do get updated.
and what about an -new flag
just update ALL conf with the newer one (BUT cfg_never still overides)
That option is exactly what get's so many people into trouble with etc-update! I chose to force people to look at those files which NEED to be looked at before they can be updated. I will never implement an "update-all-without-asking" option, however the next version will have an option that "updates-all-unmodified-files" and leaves the rest for later...

You probably haven't seen the auto-update in action yet... it becomes active after the first updating session, so on the first run you have to update every ._cfg0000_file manually but on the second session (after your next world update) you'll notice that cfg-update will update 90% of the files automatically.

The first design objective was to make updating with cfg-update SAFE, the second was to make it EASY.
When all else fails, read the manual...
Registered Linux User #340626
Top
wolfbite_aus
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Jan 19, 2005 2:48 am

  • Quote

Post by wolfbite_aus » Sun Sep 25, 2005 2:25 am

I dont ignore configs

the configs that affect me, I note.
The ones that dont i have to go through manually going y r y r y r r r r r r r r r y r (cli :)


out of the configs, I either
edit the ones manually (xorg.conf, make.conf)
and the ones I dont (pam, etc) just y r y r y r r r r r r r r r

so far this has worked (almost 12 months :)

But some configs I KNOW that I SHOULDNT be touching.
what about #CFG_ALWAYS
cfg-update AUTOmaticly use the newer one (and adds #CFG_ALWAYS to the firstline)
atleast you have made the person manually go through and add the words
then on THEIR heads..... :)

But having the choice will help people with LOTs of updating configs

#CFG_NEVER (this file will be updated by the user
#CFG_ALWAYS (this file will ALWAYS use the newer conf

Your program has made me updated the configs MORE now than I used to :)
Top
xentric
Guru
Guru
User avatar
Posts: 410
Joined: Sun Mar 16, 2003 1:57 am
Location: Netherlands

  • Quote

Post by xentric » Sun Sep 25, 2005 8:55 am

wolfbite_aus wrote:I dont ignore configs
Good :D
the configs that affect me, I note.
The ones that dont i have to go through manually going y r y r y r r r r r r r r r y r (cli :)
Do you mean that you always have to manually merge files even though you haven't modified them at all? This sounds like cfg-update isn't working properly.

If cfg-update is installed properly, it should use the alias for the emerge command in /etc/profile which causes "cfg-update --index" to run before every emerge action. See this example:

Code: Select all

root@gentoo 852MHz 64C xentric # emerge -uDpv world
________________________________________________________________________________

cfg-update 1.8.0 : No new packages have been emerged, checksum index OK...
________________________________________________________________________________


These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild     U ] sys-apps/util-linux-2.12q-r3 [2.12i-r1] +crypt +nls -old-crypt +pam +perl (-selinux) -static 2,107 kB
[ebuild     U ] dev-lang/perl-5.8.6-r6 [5.8.6-r5] +berkdb -build -debug -doc +gdbm -ithreads -minimal -perlsuid 9,465 kB
[ebuild     U ] x11-libs/qt-3.3.4-r8 [3.3.4-r3] +cups -debug -doc -examples -firebird +gif -immqt -immqt-bc +ipv6 +mysql -nas -odbc +opengl -postgres -sqlite +xinerama 14,101 kB
[ebuild     U ] app-portage/mirrorselect-1.1.7 [0.89] 7 kB
[ebuild  NS   ] dev-php/mod_php-4.4.0-r3  +X -apache2 +berkdb +crypt +curl -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix +ipv6 +java +jpeg -kerberos +ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +png -postgres -snmp +spell +ssl +tiff +truetype +xml2 -yaz 0 kB

Total size of downloads: 25,681 kB
root@gentoo 852MHz 60C xentric #
So when you type an emerge command, cfg-update will be run first. It will check if it has to update it's checksum-index. This checksum-index makes it possible to determine which files need manual merging and which files can be automatically overwritten with the new ._cfg0000_file.

This is safer and less prone to errors that adding #cfg-never or #cfg-always to the top of the files because cfg-update determines this automatically!

Are you sure that the alias in /etc/profile works correctly? See the above emerge example... you should see a cfg-update message about the checksum index everytime you use the emerge command.
When all else fails, read the manual...
Registered Linux User #340626
Top
wolfbite_aus
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Jan 19, 2005 2:48 am

  • Quote

Post by wolfbite_aus » Mon Sep 26, 2005 4:02 am

wolfden wolfbite # emerge -uDpv world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!

[blocks B ] <=net-wireless/ipw2100-1.1.0 (is blocking net-wireless/ieee80211-1.0.3)
[blocks B ] =kde-base/kappfinder-3.4* (is blocking kde-base/kdebase-3.4.1-r1)
[blocks B ] =kde-base/kcheckpass-3.4* (is blocking kde-base/kdebase-3.4.1-r1)
[blocks B ] =kde-base/kmenuedit-3.4* (is blocking kde-base/kdebase-3.4.1-r1)
etc etc

>>cfg-update message about the checksum index everytime you use the emerge command.
no, never.

checked cfg-update (1.7.2)
(guess I better update that too :)

yes I have to hand check (although cfg-update updates the ones that havent change)

but if one little thing is different, then throws up diff and it gets me to select l/r

guess I must still be missing something
it keeps mussing my configs that I DONT want changed :(

I am getting more vigilent, but can still miss some (bloddy wife talking :) hahaha etc

will emerge the latest and see if I can get it rolling better

Thanks for the feedback atleast :))
Top
wolfbite_aus
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Wed Jan 19, 2005 2:48 am

  • Quote

Post by wolfbite_aus » Mon Sep 26, 2005 4:15 am

you show

root@gentoo 852MHz 64C xentric # emerge -uDpv world
________________________________________________________________________________

cfg-update 1.8.0 : No new packages have been emerged, checksum index OK...
________________________________________________________________________________

but portage shows 1.7.2
1.8 not in portage
quick check of links, no other version

so if I
cfg-update --fix
source /etc/profile
cfg-update --index
that SHOULD get it working as above?
(thought I did all that, because its sortof working)
Top
Post Reply

249 posts
  • Page 5 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 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