Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
app-portage/cfg-update - installation instructions
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
neerolyte
n00b
n00b


Joined: 04 Jun 2004
Posts: 44
Location: Melbourne, Australia

PostPosted: Wed Jun 15, 2005 2:10 am    Post subject: Reply with quote

i rather like this, can we have this as the default now?
Back to top
View user's profile Send private message
sfp-a7x
n00b
n00b


Joined: 16 Nov 2004
Posts: 47

PostPosted: Mon Jul 04, 2005 5:59 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Mon Jul 04, 2005 8:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
wolfbite_aus
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 110

PostPosted: Sat Jul 16, 2005 10:50 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Sun Jul 17, 2005 9:00 am    Post subject: Reply with quote

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!

Quote:
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
Back to top
View user's profile Send private message
piavlo
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 141

PostPosted: Wed Jul 27, 2005 6:12 am    Post subject: Reply with quote

it seems like the cfg-update is not respecting CONFIG_PROTECT_MASK
could it be fixed?
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Thu Jul 28, 2005 5:26 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NullDevice
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2005
Posts: 84

PostPosted: Thu Jul 28, 2005 8:41 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NullDevice
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2005
Posts: 84

PostPosted: Thu Jul 28, 2005 10:14 am    Post subject: Reply with quote

ah, got it now, sryy i found it.
_________________
MfG,
NullDevice
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Thu Jul 28, 2005 7:27 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
rjmckee
n00b
n00b


Joined: 27 Jan 2004
Posts: 9
Location: Vidalia

PostPosted: Tue Aug 02, 2005 11:35 pm    Post subject: cfg-update Reply with quote

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
Back to top
View user's profile Send private message
alaskazimm
n00b
n00b


Joined: 17 Jul 2005
Posts: 15
Location: California, but my heart's in Alaska

PostPosted: Thu Sep 08, 2005 8:50 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
GeYe
n00b
n00b


Joined: 23 Sep 2004
Posts: 32
Location: Germany

PostPosted: Mon Sep 12, 2005 6:03 am    Post subject: Reply with quote

I unmerge cfg-update and now this:

Code:
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.
Back to top
View user's profile Send private message
leon_73
Guru
Guru


Joined: 13 Mar 2003
Posts: 505
Location: Milano

PostPosted: Mon Sep 12, 2005 7:23 am    Post subject: Reply with quote

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

Code:
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
Back to top
View user's profile Send private message
GeYe
n00b
n00b


Joined: 23 Sep 2004
Posts: 32
Location: Germany

PostPosted: Mon Sep 12, 2005 3:58 pm    Post subject: Reply with quote

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

Code:
# 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:
env-update


and

Code:
source /etc/profile


.

Thanks for this hint. Maybe the unmerge-script need an update :wink:
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Mon Sep 12, 2005 7:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Wed Sep 14, 2005 7:27 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Sep 14, 2005 9:45 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Wed Sep 14, 2005 11:28 pm    Post subject: Reply with quote

no problem, man :)
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
wolfbite_aus
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 110

PostPosted: Sat Sep 24, 2005 2:21 pm    Post subject: cfg-update abort codes?? Reply with quote

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 :))
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Sat Sep 24, 2005 10:26 pm    Post subject: Re: cfg-update abort codes?? Reply with quote

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.
Quote:
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
Back to top
View user's profile Send private message
wolfbite_aus
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 110

PostPosted: Sun Sep 25, 2005 2:25 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Sun Sep 25, 2005 8:55 am    Post subject: Reply with quote

wolfbite_aus wrote:
I dont ignore configs
Good :D
Quote:
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:
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
Back to top
View user's profile Send private message
wolfbite_aus
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 110

PostPosted: Mon Sep 26, 2005 4:02 am    Post subject: Reply with quote

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 :))
Back to top
View user's profile Send private message
wolfbite_aus
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2005
Posts: 110

PostPosted: Mon Sep 26, 2005 4:15 am    Post subject: Reply with quote

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)
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, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 5 of 10

 
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