Merged from trunk -r14497:14507
authorFabian Groffen <grobian@gentoo.org>
Wed, 7 Oct 2009 19:12:18 +0000 (19:12 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 7 Oct 2009 19:12:18 +0000 (19:12 -0000)
   | 14498   | Enable FEATURES=news by default and document it.             |
   | zmedico |                                                              |

   | 14499   | When restarting emerge, don't trust sys.argv[0] since        |
   | zmedico | eselect-python may modify it.                                |

   | 14500   | Add a 'digest.missing' check, for cases like mythtv where    |
   | zmedico | the eclass has modified the SRC_URI and now the Manifest has |
   |         | missing digests. Thanks to Brian Harring for the suggestion. |

   | 14501   | Add a new --accept-properties option so that users can       |
   | zmedico | temporarily override ACCEPT_PROPERTIES on the commandline,   |
   |         | without relying on emerge's legacy behavior of allowing      |
   |         | variables to leak in from the calling environment. A typical |
   |         | usage example for this option would be to use                |
   |         | --accept-properties=-interactive to temporarily mask         |
   |         | interactive packages. With default configuration, this would |
   |         | result in an effective ACCEPT_PROPERTIES value of "*         |
   |         | -interactive".                                               |

   | 14502   | Add a note about --accept-properties and exclusion of        |
   | zmedico | interactive updates.                                         |

   | 14504   | Bug #287870 - Add -r option as short version of --resume.    |
   | zmedico |                                                              |

   | 14505   | Fix collision in variable name 'x'.                          |
   | zmedico |                                                              |

   | 14506   | Exempt installed packages from PROPERTIES masking since the  |
   | zmedico | user is likely to temporarily alter ACCEPT_PROPERIES in      |
   |         | order to avoid interactive updates and we don't want this to |
   |         | distort resolver choices or trigger warning messages about   |
   |         | installed packages being masked.                             |

   | 14507   | Bug #265267 - When disabling --jobs due to interactive       |
   | zmedico | package(s), hint about --accept-properties=-interactive      |
   |         | option.                                                      |

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

NEWS
bin/repoman
cnf/make.globals
man/emerge.1
man/make.conf.5
man/repoman.1
pym/_emerge/Scheduler.py
pym/_emerge/help.py
pym/_emerge/main.py
pym/_emerge/visible.py

diff --git a/NEWS b/NEWS
index a64b4060261f01183df8ead8a4dfa0de7c113765..d9034e2642c4081ed2fc143ed54e7aab722b09df 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ portage-2.2
   in order to protect against uninstallation of required libraries.
 * Add license visibility filtering (GLEP 23)
 * Add support for generic package sets (also see RELEASE-NOTES)
+* Add --accept-properties option for emerge which allows you to use
+  --accept-properties=-interactive in order to temporarily exclude
+  interactive updates.
 
 portage-2.1.6
 -------------
index db079f4913eb452449da42fd9ad2351e727a4a81..a71e7f6a80ea0e2208a83bdf988ac06df6b43904 100755 (executable)
@@ -312,7 +312,9 @@ qahelp={
        "RDEPEND.implicit":"RDEPEND is unset in the ebuild which triggers implicit RDEPEND=$DEPEND assignment",
        "RDEPEND.suspect":"RDEPEND contains a package that usually only belongs in DEPEND.",
        "RESTRICT.invalid":"This ebuild contains invalid RESTRICT values.",
-       "digestentry.unused":"Some files listed in the Manifest aren't referenced in SRC_URI",
+       "digest.assumed":"Existing digest must be assumed correct (Package level only)",
+       "digest.missing":"Some files listed in SRC_URI aren't referenced in the Manifest",
+       "digest.unused":"Some files listed in the Manifest aren't referenced in SRC_URI",
        "ebuild.nostable":"There are no ebuilds that are marked as stable for your ARCH",
        "ebuild.allmasked":"All ebuilds are masked for this package (Package level only)",
        "ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully",
@@ -335,7 +337,8 @@ qawarnings = set((
 "changelog.ebuildadded",
 "changelog.missing",
 "changelog.notadded",
-"digestentry.unused",
+"digest.assumed",
+"digest.unused",
 "ebuild.notadded",
 "ebuild.nostable",
 "ebuild.allmasked",
@@ -1094,8 +1097,12 @@ for x in scanlist:
                myfiles_all = set(myfiles_all)
                for entry in mydigests:
                        if entry not in myfiles_all:
-                               stats["digestentry.unused"] += 1
-                               fails["digestentry.unused"].append(checkdir+"::"+entry)
+                               stats["digest.unused"] += 1
+                               fails["digest.unused"].append(checkdir+"::"+entry)
+               for entry in myfiles_all:
+                       if entry not in mydigests:
+                               stats["digest.missing"] += 1
+                               fails["digest.missing"].append(checkdir+"::"+entry)
        del myfiles_all
 
        if os.path.exists(checkdir+"/files"):
@@ -1496,8 +1503,8 @@ for x in scanlist:
                        stats[m+".syntax"] += 1
                        fails[m+".syntax"].append(catpkg+".ebuild "+m+": "+b)
 
-               badlicsyntax = len([x for x in type_list if x == "LICENSE"])
-               badprovsyntax = len([x for x in type_list if x == "PROVIDE"])
+               badlicsyntax = len([z for z in type_list if z == "LICENSE"])
+               badprovsyntax = len([z for z in type_list if z == "PROVIDE"])
                baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax 
                badlicsyntax = badlicsyntax > 0
                badprovsyntax = badprovsyntax > 0
index c2bd3f0f8620f5e848c77bc70d88a1bddded7d00..7f67ed0e4d12b22638862d14b9e6e281aee0ebd2 100644 (file)
@@ -41,7 +41,7 @@ FETCHCOMMAND="@PORTAGE_WGET@ -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\
 RESUMECOMMAND="@PORTAGE_WGET@ -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
 
 # Default user options
-FEATURES="assume-digests distlocks fixpackages parallel-fetch protect-owned
+FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned
           sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
 
 # Ignore file collisions in /lib/modules since files inside this directory
index 683af7e38c309a3820c87c8196717b14f95d52b8..f8d205930f01bc11e5210eca5e621d692c2ca6a1 100644 (file)
@@ -182,7 +182,7 @@ a sync operation. In order to specify parallel \fB\-\-regen\fR behavior, use
 the \fB\-\-jobs\fR and \fB\-\-load\-average\fR options. If you would like to
 generate and distribute cache for use by others, use \fBegencache\fR(1).
 .TP
-.BR "\-\-resume"
+.BR "\-\-resume" (\fB\-r\fR)
 Resumes the most recent merge list that has been aborted due to an error.
 Please note that this operation will only return an error on failure.  If there
 is nothing for portage to do, then portage will exit with a message and a
@@ -234,6 +234,20 @@ match multiple installed versions of slotted packages.
 Displays the version number of \fBemerge\fR.
 .SH "OPTIONS"
 .TP
+.BR \-\-accept\-properties=ACCEPT_PROPERTIES
+This option temporarily overrides the \fBACCEPT_PROPERTIES\fR
+variable. The \fBACCEPT_PROPERTIES\fR variable is incremental,
+which means that the specified setting is appended to the
+existing value from your configuration. The special \fB-*\fR
+token can be used to discard the existing configuration
+value and start fresh. See the \fBMASKED PACKAGES\fR section
+and \fBmake.conf\fR(5) for more information about
+ACCEPT_PROPERTIES. A typical usage example for this option
+would be to use \fI\-\-accept\-properties=-interactive\fR to
+temporarily mask interactive packages. With default
+configuration, this would result in an effective
+\fBACCEPT_PROPERTIES\fR value of "* -interactive".
+.TP
 .BR "\-\-alphabetical "
 When displaying USE and other flag output, combines the enabled and
 disabled lists into one list and sorts the whole list alphabetically.
@@ -667,7 +681,8 @@ packages based on properties restrictions. \fBemerge\fR examines the
 \fBACCEPT_PROPERTIES\fR environment variable to allow or disallow the emerging
 of a package masked by \fBPROPERTIES\fR. See \fBmake.conf\fR(5) for information
 about \fBACCEPT_PROPERTIES\fR, and see \fBportage\fR(5) for information about
-\fI/etc/portage/package.properties\fR.
+\fI/etc/portage/package.properties\fR. Use the \fB\-\-accept\-properties\fR
+option to temporarily override \fBACCEPT_PROPERTIES\fR.
 .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
index be4b1ab9d9b402adde74b9a7fd24c1666a4bbcf7..c0b48e92477aaab419331103dfaa22e5c450b32c 100644 (file)
@@ -43,7 +43,9 @@ Defaults to the value of * -@EULA.
 .TP
 \fBACCEPT_PROPERTIES\fR = \fI[space delimited list of properties]\fR
 This variable is used to mask packages based on PROPERTIES restrictions.
-See \fBebuild\fR(5) for more information about PROPERTIES.
+This varable can be temporarily overridden using the the
+\fB\-\-accept\-properties\fR option of \fBemerge\fR(1).
+See \fBebuild\fR(5) for more information about PROPERTIES. 
 .br
 Defaults to the value of *.
 .TP
@@ -266,6 +268,10 @@ isn't a symlink to /usr/lib64. To find the bad packages, we have a
 portage feature called \fImultilib\-strict\fR. It will prevent emerge
 from putting 64bit libraries into anything other than (/usr)/lib64.
 .TP
+.B news
+Enable GLEP 42 new support. See
+\fIhttp://www.gentoo.org/proj/en/glep/glep-0042.html\fR.
+.TP
 .B noauto
 When utilizing \fBebuild\fR(1), only run the function requested.
 .TP
index b074277496991f301dfb59a51b152e3fca80afc5..dbb214d318574c18d3c316c5f5a5579e2b273d28 100644 (file)
@@ -216,6 +216,12 @@ ChangeLogs that exist but have not been added to cvs
 .B digest.assumed
 Existing digest must be assumed correct (Package level only)
 .TP
+.B digest.missing
+Some files listed in SRC_URI aren't referenced in the Manifest
+.TP
+.B digest.unused
+Some files listed in the Manifest aren't referenced in SRC_URI
+.TP
 .B ebuild.allmasked
 All ebuilds are masked for this package (Package level only)
 .TP
index b6f08307d4e137ec551b80ebd2eeca68cc331d94..00c27925b6a131988c03d113d43af5c90f2cb287 100644 (file)
@@ -309,7 +309,10 @@ class Scheduler(PollScheduler):
                                        writemsg_level(">>> Setting --jobs=1 due " + \
                                                "to the above interactive package(s)\n",
                                                level=logging.INFO, noiselevel=-1)
-
+                                       writemsg_level(">>> In order to temporarily mask " + \
+                                               "interactive updates, you may\n" + \
+                                               ">>> specify --accept-properties=-interactive\n",
+                                               level=logging.INFO, noiselevel=-1)
                self._status_display.quiet = \
                        not background or \
                        ("--quiet" in self.myopts and \
@@ -753,7 +756,9 @@ class Scheduler(PollScheduler):
                mtimedb["resume"]["mergelist"].remove(list(pkg))
                mtimedb.commit()
                portage.run_exitfuncs()
-               mynewargv = [sys.argv[0], "--resume"]
+               # Don't trust sys.argv[0] here because eselect-python may modify it.
+               emerge_binary = os.path.join(portage.const.PORTAGE_BIN_PATH, 'emerge')
+               mynewargv = [emerge_binary, "--resume"]
                resume_opts = self.myopts.copy()
                # For automatic resume, we need to prevent
                # any of bad_resume_opts from leaking in
index f34691682f8fbd9a1ab9c404ad6710bfca77ae86..5875cc29d5cf547c89d5f3b529e6023d8a3ef683 100644 (file)
@@ -14,7 +14,7 @@ def shorthelp():
        print("   "+turquoise("emerge")+" < "+turquoise("--sync")+" | "+turquoise("--metadata")+" | "+turquoise("--info")+" >")
        print("   "+turquoise("emerge")+" "+turquoise("--resume")+" [ "+green("--pretend")+" | "+green("--ask")+" | "+green("--skipfirst")+" ]")
        print("   "+turquoise("emerge")+" "+turquoise("--help")+" [ "+green("--verbose")+" ] ")
-       print(bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhjkKlnNoOpqPsStuvV")+"]")
+       print(bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhjkKlnNoOpPqrsStuvV")+"]")
        print("          [ " + green("--color")+" < " + turquoise("y") + " | "+ turquoise("n")+" >            ] [ "+green("--columns")+"    ]")
        print("          [ "+green("--complete-graph")+"             ] [ "+green("--deep")+"       ]")
        print("          [ "+green("--jobs") + " " + turquoise("JOBS")+" ] [ "+green("--keep-going")+" ] [ " + green("--load-average")+" " + turquoise("LOAD") + "            ]")
@@ -161,7 +161,7 @@ def help(myopts, havecolor=1):
                for line in wrap(desc, desc_width):
                        print(desc_indent + line)
                print()
-               print("       "+green("--resume"))
+               print("       "+green("--resume")+" ("+green("-r")+" short option)")
                print("              Resumes the most recent merge list that has been aborted due to an")
                print("              error. Please note that this operation will only return an error")
                print("              on failure. If there is nothing for portage to do, then portage")
@@ -232,6 +232,22 @@ def help(myopts, havecolor=1):
                print("              "+bold("emerge info")+" for more advanced information.")
                print()
                print(turquoise("Options:"))
+               print("       "+green("--accept-properties=ACCEPT_PROPERTIES"))
+               desc = "This option temporarily overrides the ACCEPT_PROPERTIES " + \
+                       "variable. The ACCEPT_PROPERTIES variable is incremental, " + \
+                       "which means that the specified setting is appended to the " + \
+                       "existing value from your configuration. The special -* " + \
+                       "token can be used to discard the existing configuration " + \
+                       "value and start fresh. See the MASKED PACKAGES section " + \
+                       "and make.conf(5) for more information about " + \
+                       "ACCEPT_PROPERTIES. A typical usage example for this option " + \
+                       "would be to use --accept-properties=-interactive to " + \
+                       "temporarily mask interactive packages. With default " + \
+                       "configuration, this would result in an effective " + \
+                       "ACCEPT_PROPERTIES value of \"* -interactive\"."
+               for line in wrap(desc, desc_width):
+                       print(desc_indent + line)
+               print()
                print("       "+green("--alphabetical"))
                print("              When displaying USE and other flag output, combines the enabled")
                print("              and disabled flags into a single list and sorts it alphabetically.")
index 1ff4c3af71e5299ff90c7f1851e23a614ea8dffd..9114322ae4e60cce2ad65db8c1197e9a3efa7bf4 100644 (file)
@@ -84,6 +84,7 @@ shortmapping={
 "o":"--onlydeps",  "O":"--nodeps",
 "p":"--pretend",   "P":"--prune",
 "q":"--quiet",
+"r":"--resume",
 "s":"--search",    "S":"--searchdesc",
 "t":"--tree",
 "u":"--update",
@@ -499,6 +500,10 @@ def parse_opts(tmpcmdline, silent=False):
 
        longopt_aliases = {"--cols":"--columns", "--skip-first":"--skipfirst"}
        argument_options = {
+               "--accept-properties": {
+                       "help":"temporarily override ACCEPT_PROPERTIES",
+                       "action":"store"
+               },
                "--config-root": {
                        "help":"specify the location for portage configuration files",
                        "action":"store"
@@ -1048,6 +1053,8 @@ def emerge_main():
                os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"]
        if "--root" in myopts:
                os.environ["ROOT"] = myopts["--root"]
+       if "--accept-properties" in myopts:
+               os.environ["ACCEPT_PROPERTIES"] = myopts["--accept-properties"]
 
        # Portage needs to ensure a sane umask for the files it creates.
        os.umask(0o22)
index 4542e1c97bdca149939b4c132569d7a56c9bf852..3978c171421de8e5d7602853843e8121c9fdeec0 100644 (file)
@@ -33,6 +33,11 @@ def visible(pkgsettings, pkg):
                        return False
                if pkgsettings._getMissingKeywords(pkg.cpv, pkg.metadata):
                        return False
+               try:
+                       if pkgsettings._getMissingProperties(pkg.cpv, pkg.metadata):
+                               return False
+               except portage.exception.InvalidDependString:
+                       return False
        if pkgsettings._getMaskAtom(pkg.cpv, pkg.metadata):
                return False
        if pkgsettings._getProfileMaskAtom(pkg.cpv, pkg.metadata):
@@ -40,9 +45,6 @@ def visible(pkgsettings, pkg):
        try:
                if pkgsettings._getMissingLicenses(pkg.cpv, pkg.metadata):
                        return False
-               if pkgsettings._getMissingProperties(pkg.cpv, pkg.metadata):
-                       return False
        except portage.exception.InvalidDependString:
                return False
        return True
-