Merged from trunk 7429:7516
authorFabian Groffen <grobian@gentoo.org>
Mon, 30 Jul 2007 20:39:58 +0000 (20:39 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 30 Jul 2007 20:39:58 +0000 (20:39 -0000)
   +------------------------------------------------------------------------+
   | 7430    | For bug #137483, move the `emerge --help config` docs to the |
   | zmedico | emerge man page. Thanks to Arfrever Frehtes Taifersar        |
   |         | Arahesis for this patch.                                     |
   |---------+--------------------------------------------------------------|
   | 7432    | For bug #139670, update the dohtml docs to show all          |
   | zmedico | supported file extensions. Thanks to Arfrever Frehtes        |
   |         | Taifersar Arahesis for this patch.                           |
   |---------+--------------------------------------------------------------|
   | 7496    | Always pass a dbapi instance into a setcpv call.             |
   | zmedico |                                                              |
   |---------+--------------------------------------------------------------|
   | 7516    | For bug #186960, try to create a directory for $ROOT if it   |
   | zmedico | doesn't exist.                                               |
   +------------------------------------------------------------------------+

svn path=/main/branches/prefix/; revision=7521

man/ebuild.5
man/emerge.1
pym/emerge/__init__.py
pym/emerge/help.py
pym/portage/__init__.py

index 6aea9d4370ad9939e6647d8c7956a08f9fcb3c6f..868d1d73d547ad76b15c6e6409a08f48eb7744b6 100644 (file)
@@ -775,8 +775,8 @@ Performs the ln command as either a hard link or symlink.
 .TP
 \fBdohtml\fR \fI [\-a filetypes] [\-r] [\-x list\-of\-dirs\-to\-ignore] [list\-of\-files\-and\-dirs]\fR
 Installs the files in the list of files (space\-separated list) into
-/usr/share/doc/${PF}/html provided the file ends in .html, .png, .js, .jpg,
-or .css.  Setting \fI\-a\fR limits what types of files will be included,
+/usr/share/doc/${PF}/html provided the file ends in .html, .htm, .gif, .jpg, .png, .js, or .css.
+Setting \fI\-a\fR limits what types of files will be included,
 \fI\-A\fR appends to the default list, setting \fI\-x\fR sets which dirs to
 exclude (CVS excluded by default), \fI\-r\fR sets recursive.
 .TP
index f7400763aabe2835fef98c25cd8e9f02cb214519..e2e37b25c4409a8398c4def7afd45ee79ea5ddb6 100644 (file)
@@ -553,6 +553,43 @@ variable to allow or disallow the emerging of a package masked by
 versions of packages, you should update your 
 \fI/etc/portage/package.keywords\fR file to list the packages you want the 
 \'testing\' version.  See \fBportage\fR(5) for more information.
+.SH "CONFIGURATION FILES"
+Portage has a special feature called "config file protection". The purpose of
+this feature is to prevent new package installs from clobbering existing
+configuration files. By default, config file protection is turned on for /etc
+and the KDE configuration dirs; more may be added in the future.
+.LP
+When Portage installs a file into a protected directory tree like /etc, any
+existing files will not be overwritten. If a file of the same name already
+exists, Portage will change the name of the to\-be\-installed file from 'foo' to
+\'._cfg0000_foo\'. If \'._cfg0000_foo\' already exists, this name becomes
+\'._cfg0001_foo\', etc. In this way, existing files are not overwritten,
+allowing the administrator to manually merge the new config files and avoid any
+unexpected changes.
+.LP
+In addition to protecting overwritten files, Portage will not delete any files
+from a protected directory when a package is unmerged. While this may be a
+little bit untidy, it does prevent potentially valuable config files from being
+deleted, which is of paramount importance.
+.LP
+Protected directories are set using the \fICONFIG_PROTECT\fR variable, normally
+defined in /etc/make.globals. Directory exceptions to the CONFIG_PROTECTed
+directories can be specified using the \fICONFIG_PROTECT_MASK\fR variable. To find
+files that need to be updated in /etc, type \fBfind /etc \-iname \'._cfg????_*\'\fR.
+.LP
+You can disable this feature by setting \fICONFIG_PROTECT="\-*"\fR in /etc/make.conf.
+Then, Portage will mercilessly auto\-update your config files. Alternatively,
+you can leave Config File Protection on but tell Portage that it can overwrite
+files in certain specific /etc subdirectories. For example, if you wanted
+Portage to automatically update your rc scripts and your wget configuration,
+but didn't want any other changes made without your explicit approval, you'd
+add this to /etc/make.conf:
+.LP
+.I CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
+.LP
+Tools such as dispatch\-conf, cfg\-update, and etc\-update are also available to
+aid in the merging of these files. They provide interactive merging and can
+auto\-merge trivial changes.
 .SH "REPORTING BUGS"
 Please report any bugs you encounter through our website:
 .LP
index 4aa61288852c0049dc89afeae08fb87dae5ac3f1..dcf17c94bdb11e75995ab9e89ef29d439795eaa6 100644 (file)
@@ -2824,7 +2824,7 @@ class depgraph(object):
                                                mydbapi.aux_get(pkg_key, ["IUSE"])[0].split()))
 
                                        forced_flags = set()
-                                       pkgsettings.setcpv(pkg_key) # for package.use.{mask,force}
+                                       pkgsettings.setcpv(pkg_key, mydb=mydbapi) # for package.use.{mask,force}
                                        forced_flags.update(pkgsettings.useforce)
                                        forced_flags.update(pkgsettings.usemask)
 
@@ -4398,8 +4398,9 @@ def chk_updated_cfg_files(target_root, config_protect):
                                                 print "config file '%s' needs updating." % x
 
                if procount:
-                       #print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
-                       print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files."
+                       print " "+yellow("*")+" See the "+colorize("INFORM","CONFIGURATION FILES")+ \
+                               " section of the " + bold("emerge")
+                       print " "+yellow("*")+" man page to learn how to update config files."
 
 def checkUpdatedNewsItems(portdb, vardb, NEWS_PATH, UNREAD_PATH, repo_id):
        """
index d7000aa1557a1b314ddc215551ac766a51bdc1d9..bbb17abe2ffccf160f54f7a4293835e207fe4ea4 100644 (file)
@@ -391,48 +391,4 @@ def help(myaction,myopts,havecolor=1):
                print "       versions or newer ebuilds have become available since you last did a"
                print "       sync and update."
                print
-       elif myaction=="config":
-               outstuff=green("Config file management support (preliminary)")+"""
-
-Portage has a special feature called "config file protection".  The purpose of
-this feature is to prevent new package installs from clobbering existing
-configuration files.  By default, config file protection is turned on for /etc
-and the KDE configuration dirs; more may be added in the future.
-
-When Portage installs a file into a protected directory tree like /etc, any
-existing files will not be overwritten.  If a file of the same name already
-exists, Portage will change the name of the to-be-installed file from 'foo' to
-'._cfg0000_foo'.  If '._cfg0000_foo' already exists, this name becomes
-'._cfg0001_foo', etc.  In this way, existing files are not overwritten,
-allowing the administrator to manually merge the new config files and avoid any
-unexpected changes.
-
-In addition to protecting overwritten files, Portage will not delete any files
-from a protected directory when a package is unmerged.  While this may be a
-little bit untidy, it does prevent potentially valuable config files from being
-deleted, which is of paramount importance.
-
-Protected directories are set using the CONFIG_PROTECT variable, normally
-defined in /etc/make.globals.  Directory exceptions to the CONFIG_PROTECTed
-directories can be specified using the CONFIG_PROTECT_MASK variable.  To find
-files that need to be updated in /etc, type:
-
-# find /etc -iname '._cfg????_*'
-
-You can disable this feature by setting CONFIG_PROTECT="-*" in /etc/make.conf.
-Then, Portage will mercilessly auto-update your config files.  Alternatively,
-you can leave Config File Protection on but tell Portage that it can overwrite
-files in certain specific /etc subdirectories.  For example, if you wanted
-Portage to automatically update your rc scripts and your wget configuration,
-but didn't want any other changes made without your explicit approval, you'd
-add this to /etc/make.conf:
-
-CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
-
-Tools such as dispatch-conf, cfg-update, and etc-update are also available to
-aid in the merging of these files. They provide interactive merging and can
-auto-merge trivial changes.
-
-"""
-               print outstuff
 
index 3994507546220d9a4ac40ef11f6e61cb56ef134f..b2c23260923268a0ef9117b8ac1ed802a1dcb5e6 100644 (file)
@@ -1211,6 +1211,7 @@ class config(object):
                        target_root = normalize_path(os.path.abspath(
                                target_root)).rstrip(os.path.sep) + os.path.sep
 
+                       portage.util.ensure_dirs(target_root + EPREFIX_LSTRIP)
                        check_var_directory("ROOT", target_root + EPREFIX_LSTRIP)
 
                        env_d = getconfig(