Merged from trunk 4847:4855
authorFabian Groffen <grobian@gentoo.org>
Fri, 27 Oct 2006 21:51:36 +0000 (21:51 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 27 Oct 2006 21:51:36 +0000 (21:51 -0000)
Do not pass the "clean" parameter to doebuild since it causes ${T} to be
cleaned up when it shouldn't be.  Thanks to Mr_Bones_ for reporting.

Don't bother to insert /usr/lib/portage/pym into sys.path from inside a
module.  That's the caller's job.

Add --with-bdeps to emerge --help output.

Update help for --deep.

Update help for greedy behavior of --update.

Add backward compatibility code for cache modules that override has_key
instead of __contains__.

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

bin/ebuild
pym/cache/template.py
pym/dispatch_conf.py
pym/emergehelp.py

index d47c9258232def6730e2753dc0c0c82edc44741c..be83ba5d58cf02829ea1226fbbfe35e833163daa 100755 (executable)
@@ -106,7 +106,8 @@ for arg in pargs:
                tmpsettings = portage.config(clone=portage.settings)
                if arg == "digest" and force:
                        discard_digests(ebuild, tmpsettings, portage.portdb)
-               a = portage.doebuild(ebuild, arg, portage.root, tmpsettings, debug=debug, cleanup=("noauto" not in portage.features), tree=mytree)
+               a = portage.doebuild(ebuild, arg, portage.root, tmpsettings,
+                       debug=debug, tree=mytree)
        except KeyboardInterrupt:
                print "Interrupted."
                a = 1
index 5c72da286dedd21439543dfef4b82e1bbb84fecb..7c2642f13a0ba36b5a118b7fff8225bed9097478 100644 (file)
@@ -114,7 +114,14 @@ class database(object):
                        raise NotImplementedError
 
        def __contains__(self, cpv):
-               raise NotImplementedError
+               """This method should always be overridden.  It is provided only for
+               backward compatibility with modules that override has_key instead.  It
+               will automatically raise a NotImplementedError if has_key has not been
+               overridden."""
+               if self.has_key is database.has_key:
+                       # prevent a possible recursive loop
+                       raise NotImplementedError
+               return self.has_key(cpv)
 
        def get_matches(self, match_dict):
                """generic function for walking the entire cache db, matching restrictions to
index e7a7da039c7d7ea1b26730f86912b22c1dd0c2c7..70c0a011dc2cbfb4a736f05d5907ca703d6cf14c 100644 (file)
@@ -10,7 +10,6 @@
 from stat import *
 import os, sys, commands, shutil
 
-sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym"))
 import portage
 
 RCS_BRANCH = '1.1.1'
index 9b1c9032aefdb29056ce808c2a19bdfe0be09db3..c6c0e465de6a7f17b61ab13c5f12a716616c2dfc 100644 (file)
@@ -17,6 +17,7 @@ def shorthelp():
        print "   "+turquoise("emerge")+" "+turquoise("--help")+" [ "+green("system")+" | "+green("world")+" | "+green("config")+" | "+green("--sync")+" ] "
        print bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhikKlnNoOpqPsStuvV")+"] ["+green("--oneshot")+"] ["+green("--newuse")+"] ["+green("--noconfmem")+"]"
        print      "                                          ["+green("--columns")+"] ["+green("--nocolor")+"] ["+green("--nospinner")+"]"
+       print "                                          [ "+green("--deep")+"  ] [" + green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ]"
        print bold("Actions:")+" [ "+green("--clean")+" | "+green("--depclean")+" | "+green("--prune")+" | "+green("--regen")+" | "+green("--search")+" | "+green("--unmerge")+" ]"
        print
 
@@ -140,8 +141,9 @@ def help(myaction,myopts,havecolor=1):
                print "              Updates packages to the best version available, which may not"
                print "              always be the highest version number due to masking for testing"
                print "              and development. This will also update direct dependencies which"
-               print "              may not what you want. In general use this option only in combi-"
-               print "              nation with the world or system target."
+               print "              may not what you want. Package atoms specified on the command line"
+               print "              are greedy, meaning that unspecific atoms may match multiple"
+               print "              installed versions of slotted packages."
                print
                print "       "+green("--version")+" ("+green("-V")+" short option)"
                print "              Displays the currently installed version of portage along with"
@@ -196,11 +198,12 @@ def help(myaction,myopts,havecolor=1):
                print "              very verbose information about the dependency and build process."
                print
                print "       "+green("--deep")+" ("+green("-D")+" short option)"
-               print "              When used in conjunction with --update, this flag forces emerge"
-               print "              to consider the entire dependency tree of packages, instead of"
-               print "              checking only the immediate dependencies of the packages.  As an"
-               print "              example, this catches updates in libraries that are not directly"
-               print "              listed in the dependencies of a package."
+               print "              This flag forces emerge to consider the entire dependency tree of"
+               print "              packages, instead of checking only the immediate dependencies of"
+               print "              the packages. As an example, this catches updates in libraries"
+               print "              that are not directly listed in the dependencies of a package."
+               print "              Also see --with-bdeps for behavior with respect to build time"
+               print "              dependencies that are not strictly required."
                print 
                print "       "+green("--emptytree")+" ("+green("-e")+" short option)"
                print "              Virtually tweaks the tree of installed packages to contain"
@@ -313,6 +316,13 @@ def help(myaction,myopts,havecolor=1):
                print "              Effects vary, but the general outcome is an increased or expanded"
                print "              display of content in portage's displays."
                print
+               print "       "+green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" >"
+               print "              In dependency calculations, pull in build time dependencies that"
+               print "              are not strictly required. This defaults to 'n' for installation"
+               print "              actions and 'y' for the --depclean action. This setting can be"
+               print "              added to EMERGE_DEFAULT_OPTS (see make.conf(5)) and later"
+               print "              overridden via the command line."
+               print
        elif myaction == "sync":
                print
                print bold("Usage: ")+turquoise("emerge")+" "+turquoise("--sync")