Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137483 | Differences between
and this patch

Collapse All | Expand All

(-)pym/emerge/help.py (-44 lines)
Lines 391-438 Link Here
391
		print "       versions or newer ebuilds have become available since you last did a"
391
		print "       versions or newer ebuilds have become available since you last did a"
392
		print "       sync and update."
392
		print "       sync and update."
393
		print
393
		print
394
	elif myaction=="config":
395
		outstuff=green("Config file management support (preliminary)")+"""
396
394
397
Portage has a special feature called "config file protection".  The purpose of
398
this feature is to prevent new package installs from clobbering existing
399
configuration files.  By default, config file protection is turned on for /etc
400
and the KDE configuration dirs; more may be added in the future.
401
402
When Portage installs a file into a protected directory tree like /etc, any
403
existing files will not be overwritten.  If a file of the same name already
404
exists, Portage will change the name of the to-be-installed file from 'foo' to
405
'._cfg0000_foo'.  If '._cfg0000_foo' already exists, this name becomes
406
'._cfg0001_foo', etc.  In this way, existing files are not overwritten,
407
allowing the administrator to manually merge the new config files and avoid any
408
unexpected changes.
409
410
In addition to protecting overwritten files, Portage will not delete any files
411
from a protected directory when a package is unmerged.  While this may be a
412
little bit untidy, it does prevent potentially valuable config files from being
413
deleted, which is of paramount importance.
414
415
Protected directories are set using the CONFIG_PROTECT variable, normally
416
defined in /etc/make.globals.  Directory exceptions to the CONFIG_PROTECTed
417
directories can be specified using the CONFIG_PROTECT_MASK variable.  To find
418
files that need to be updated in /etc, type:
419
420
# find /etc -iname '._cfg????_*'
421
422
You can disable this feature by setting CONFIG_PROTECT="-*" in /etc/make.conf.
423
Then, Portage will mercilessly auto-update your config files.  Alternatively,
424
you can leave Config File Protection on but tell Portage that it can overwrite
425
files in certain specific /etc subdirectories.  For example, if you wanted
426
Portage to automatically update your rc scripts and your wget configuration,
427
but didn't want any other changes made without your explicit approval, you'd
428
add this to /etc/make.conf:
429
430
CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
431
432
Tools such as dispatch-conf, cfg-update, and etc-update are also available to
433
aid in the merging of these files. They provide interactive merging and can
434
auto-merge trivial changes.
435
436
"""
437
		print outstuff
438
(-)pym/emerge/__init__.py (-2 / +1 lines)
Lines 4397-4404 Link Here
4397
						 print "config file '%s' needs updating." % x
4397
						 print "config file '%s' needs updating." % x
4398
4398
4399
		if procount:
4399
		if procount:
4400
			#print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
4400
			print " "+yellow("*")+" See "+green("CONFIGURATION FILES")+" section in the emerge man page to learn how to update config files."
4401
			print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
4402
4401
4403
def checkUpdatedNewsItems(portdb, vardb, NEWS_PATH, UNREAD_PATH, repo_id):
4402
def checkUpdatedNewsItems(portdb, vardb, NEWS_PATH, UNREAD_PATH, repo_id):
4404
	"""
4403
	"""
(-)man/emerge.1 (+37 lines)
Lines 553-558 Link Here
553
versions of packages, you should update your 
553
versions of packages, you should update your 
554
\fI/etc/portage/package.keywords\fR file to list the packages you want the 
554
\fI/etc/portage/package.keywords\fR file to list the packages you want the 
555
\'testing\' version.  See \fBportage\fR(5) for more information.
555
\'testing\' version.  See \fBportage\fR(5) for more information.
556
.SH "CONFIGURATION FILES"
557
Portage has a special feature called "config file protection". The purpose of
558
this feature is to prevent new package installs from clobbering existing
559
configuration files. By default, config file protection is turned on for /etc
560
and the KDE configuration dirs; more may be added in the future.
561
.LP
562
When Portage installs a file into a protected directory tree like /etc, any
563
existing files will not be overwritten. If a file of the same name already
564
exists, Portage will change the name of the to\-be\-installed file from 'foo' to
565
\'._cfg0000_foo\'. If \'._cfg0000_foo\' already exists, this name becomes
566
\'._cfg0001_foo\', etc. In this way, existing files are not overwritten,
567
allowing the administrator to manually merge the new config files and avoid any
568
unexpected changes.
569
.LP
570
In addition to protecting overwritten files, Portage will not delete any files
571
from a protected directory when a package is unmerged. While this may be a
572
little bit untidy, it does prevent potentially valuable config files from being
573
deleted, which is of paramount importance.
574
.LP
575
Protected directories are set using the \fICONFIG_PROTECT\fR variable, normally
576
defined in /etc/make.globals. Directory exceptions to the CONFIG_PROTECTed
577
directories can be specified using the \fICONFIG_PROTECT_MASK\fR variable. To find
578
files that need to be updated in /etc, type \fBfind /etc \-iname \'._cfg????_*\'\fR.
579
.LP
580
You can disable this feature by setting \fICONFIG_PROTECT="\-*"\fR in /etc/make.conf.
581
Then, Portage will mercilessly auto\-update your config files. Alternatively,
582
you can leave Config File Protection on but tell Portage that it can overwrite
583
files in certain specific /etc subdirectories. For example, if you wanted
584
Portage to automatically update your rc scripts and your wget configuration,
585
but didn't want any other changes made without your explicit approval, you'd
586
add this to /etc/make.conf:
587
.LP
588
.I CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
589
.LP
590
Tools such as dispatch\-conf, cfg\-update, and etc\-update are also available to
591
aid in the merging of these files. They provide interactive merging and can
592
auto\-merge trivial changes.
556
.SH "REPORTING BUGS"
593
.SH "REPORTING BUGS"
557
Please report any bugs you encounter through our website:
594
Please report any bugs you encounter through our website:
558
.LP
595
.LP

Return to bug 137483