From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R5Q9h-0000wl-66 for garchives@archives.gentoo.org; Sun, 18 Sep 2011 22:48:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2349921C030; Sun, 18 Sep 2011 22:48:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E365421C030 for ; Sun, 18 Sep 2011 22:47:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7D2281B400B for ; Sun, 18 Sep 2011 22:47:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8D0E480042 for ; Sun, 18 Sep 2011 22:47:58 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1a5a662780f7a4401a89f0939a9180872f36f05f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/env_update.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 1a5a662780f7a4401a89f0939a9180872f36f05f Date: Sun, 18 Sep 2011 22:47:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 329f66af8c032b2858e802150a6499e1 commit: 1a5a662780f7a4401a89f0939a9180872f36f05f Author: Zac Medico gentoo org> AuthorDate: Sun Sep 18 22:47:45 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Sep 18 22:47:45 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D1a5a6627 env_update: use global vardbapi as fallback --- pym/portage/util/env_update.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update= .py index 71dcf37..78bef82 100644 --- a/pym/portage/util/env_update.py +++ b/pym/portage/util/env_update.py @@ -20,6 +20,7 @@ from portage.util import atomic_ofstream, ensure_dirs, = getconfig, \ normalize_path, writemsg from portage.util.listdir import listdir from portage.dbapi.vartree import vartree +from portage.package.ebuild.config import config =20 if sys.hexversion >=3D 0x3000000: long =3D int @@ -41,7 +42,12 @@ def env_update(makelinks=3D1, target_root=3DNone, prev= _mtimes=3DNone, contents=3DNone, @type target_root: String (Path) """ if vardbapi is None: - vardbapi =3D vartree(settings=3Dportage.settings).dbapi + if isinstance(env, config): + vardbapi =3D vartree(settings=3Denv).dbapi + else: + if target_root is None: + target_root =3D portage.settings["ROOT"] + vardbapi =3D portage.db[target_root]["vartree"].dbapi =20 # Lock the config memory file to prevent symlink creation # in merge_contents from overlapping with env-update.