Make --nodepa automatically disable --tree.
authorZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 03:27:09 +0000 (03:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 03:27:09 +0000 (03:27 -0000)
svn path=/main/trunk/; revision=10121

pym/_emerge/__init__.py

index f2f95f84188efdbe0e604638a8db7816d80bf7e0..1e258ec722b036153a7eb3305e8edc6cd2c2d5e9 100644 (file)
@@ -7582,7 +7582,13 @@ def action_build(settings, trees, mtimedb,
        pretend = "--pretend" in myopts
        fetchonly = "--fetchonly" in myopts or "--fetch-all-uri" in myopts
        ask = "--ask" in myopts
+       nodeps = "--nodeps" in myopts
        tree = "--tree" in myopts
+       if nodeps and tree:
+               tree = False
+               del myopts["--tree"]
+               portage.writemsg(colorize("WARN", " * ") + \
+                       "--tree is broken with --nodeps. Disabling...\n")
        verbose = "--verbose" in myopts
        quiet = "--quiet" in myopts
        if pretend or fetchonly:
@@ -7660,6 +7666,24 @@ def action_build(settings, trees, mtimedb,
                for opt in ("--skipfirst", "--ask", "--tree"):
                        resume_opts.pop(opt, None)
                myopts.update(resume_opts)
+
+               buildpkgonly = "--buildpkgonly" in myopts
+               pretend = "--pretend" in myopts
+               fetchonly = "--fetchonly" in myopts or "--fetch-all-uri" in myopts
+               ask = "--ask" in myopts
+               nodeps = "--nodeps" in myopts
+               tree = "--tree" in myopts
+               if nodeps and tree:
+                       tree = False
+                       del myopts["--tree"]
+                       portage.writemsg(colorize("WARN", " * ") + \
+                               "--tree is broken with --nodeps. Disabling...\n")
+               verbose = "--verbose" in myopts
+               quiet = "--quiet" in myopts
+               if pretend or fetchonly:
+                       # make the mtimedb readonly
+                       mtimedb.filename = None
+
                if show_spinner:
                        print "Calculating dependencies  ",
                myparams = create_depgraph_params(myopts, myaction)