Add @rebuilt-binaries set which uses BUILD_TIME to pull in binary packages
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:24:48 +0000 (20:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:24:48 +0000 (20:24 -0000)
that have a different build time from a currently installed package of the
exact same version. (trunk r15363)

svn path=/main/branches/2.1.7/; revision=15590

pym/_emerge/depgraph.py
pym/_emerge/main.py

index db8ddef63c86276d35c9aabee69f6714871b1f09..c53abb87a89d179a50f5f566404582cff8f29a52 100644 (file)
@@ -229,11 +229,6 @@ class _dynamic_depgraph_config(object):
                                ]["vartree"].dbapi._aux_cache_keys)
                        dbs.append((vardb, "installed", True, True, db_keys))
                        self._filtered_trees[myroot]["dbs"] = dbs
-                       if "--usepkg" in depgraph._frozen_config.myopts:
-                               depgraph._frozen_config._trees_orig[myroot
-                                       ]["bintree"].populate(
-                                       "--getbinpkg" in depgraph._frozen_config.myopts,
-                                       "--getbinpkgonly" in depgraph._frozen_config.myopts)
 
 class depgraph(object):
 
index c53ecd4a9c030d501e4ec15f9eda0cec9d92371e..b7cc8f7cc8d3f81f6fd409cde0bbb7191edd740c 100644 (file)
@@ -1066,10 +1066,43 @@ def emerge_main():
                config_protect_check(trees)
        check_procfs()
 
+       if "getbinpkg" in settings.features:
+               myopts["--getbinpkg"] = True
+
+       if "--getbinpkgonly" in myopts:
+               myopts["--getbinpkg"] = True
+
+       if "--getbinpkgonly" in myopts:
+               myopts["--usepkgonly"] = True
+
+       if "--getbinpkg" in myopts:
+               myopts["--usepkg"] = True
+
+       if "--usepkgonly" in myopts:
+               myopts["--usepkg"] = True
+
+       if "buildpkg" in settings.features or "--buildpkgonly" in myopts:
+               myopts["--buildpkg"] = True
+
+       if "--buildpkgonly" in myopts:
+               # --buildpkgonly will not merge anything, so
+               # it cancels all binary package options.
+               for opt in ("--getbinpkg", "--getbinpkgonly",
+                       "--usepkg", "--usepkgonly"):
+                       myopts.pop(opt, None)
+
        for mytrees in trees.values():
                mydb = mytrees["porttree"].dbapi
                # Freeze the portdbapi for performance (memoize all xmatch results).
                mydb.freeze()
+
+               if "--usepkg" in myopts:
+                       # Populate the bintree with current --getbinpkg setting.
+                       # This needs to happen before expand_set_arguments(), in case
+                       # any sets use the bintree.
+                       mytrees["bintree"].populate(
+                               getbinpkgs="--getbinpkg" in myopts)
+
        del mytrees, mydb
 
        if "moo" in myfiles:
@@ -1125,42 +1158,12 @@ def emerge_main():
                spinner.update = spinner.update_quiet
                portage.util.noiselimit = -1
 
-       # Always create packages if FEATURES=buildpkg
-       # Imply --buildpkg if --buildpkgonly
-       if ("buildpkg" in settings.features) or ("--buildpkgonly" in myopts):
-               if "--buildpkg" not in myopts:
-                       myopts["--buildpkg"] = True
-
-       # Always try and fetch binary packages if FEATURES=getbinpkg
-       if ("getbinpkg" in settings.features):
-               myopts["--getbinpkg"] = True
-
-       if "--buildpkgonly" in myopts:
-               # --buildpkgonly will not merge anything, so
-               # it cancels all binary package options.
-               for opt in ("--getbinpkg", "--getbinpkgonly",
-                       "--usepkg", "--usepkgonly"):
-                       myopts.pop(opt, None)
-
        if "--fetch-all-uri" in myopts:
                myopts["--fetchonly"] = True
 
        if "--skipfirst" in myopts and "--resume" not in myopts:
                myopts["--resume"] = True
 
-       if ("--getbinpkgonly" in myopts) and not ("--usepkgonly" in myopts):
-               myopts["--usepkgonly"] = True
-
-       if ("--getbinpkgonly" in myopts) and not ("--getbinpkg" in myopts):
-               myopts["--getbinpkg"] = True
-
-       if ("--getbinpkg" in myopts) and not ("--usepkg" in myopts):
-               myopts["--usepkg"] = True
-
-       # Also allow -K to apply --usepkg/-k
-       if ("--usepkgonly" in myopts) and not ("--usepkg" in myopts):
-               myopts["--usepkg"] = True
-
        # Allow -p to remove --ask
        if "--pretend" in myopts:
                myopts.pop("--ask", None)