bin/ebuild: simplify PORTDIR_OVERLAY query v2.2.0_alpha59
authorZac Medico <zmedico@gentoo.org>
Mon, 19 Sep 2011 03:17:44 +0000 (20:17 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 19 Sep 2011 03:17:44 +0000 (20:17 -0700)
There's no need to query os.environ here, because portage.settings
will inherit the value automatically.

bin/ebuild

index f47975aad9b28d88bbf9aeeb6f21cf2f1262f352..1cbdb2d7abd22266b0eee85df3d474bc54f08d35 100755 (executable)
@@ -134,11 +134,7 @@ vdb_path = os.path.realpath(os.path.join(portage.settings['EROOT'], VDB_PATH))
 # Make sure that portdb.findname() returns the correct ebuild.
 if ebuild_portdir != vdb_path and \
        ebuild_portdir not in portage.portdb.porttrees:
-       portdir_overlay = os.environ.get("PORTDIR_OVERLAY")
-       if portdir_overlay is None:
-               portdir_overlay = portage.settings.get("PORTDIR_OVERLAY")
-       if portdir_overlay is None:
-               portdir_overlay = ""
+       portdir_overlay = portage.settings.get("PORTDIR_OVERLAY", "")
        if sys.hexversion >= 0x3000000:
                os.environ["PORTDIR_OVERLAY"] = \
                        portdir_overlay + \