From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BFF26138010 for ; Mon, 24 Sep 2012 15:19:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85DC621C1C4; Mon, 24 Sep 2012 15:19:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 54E2A21C1C4 for ; Mon, 24 Sep 2012 15:19:10 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BCDCC33CEFB for ; Mon, 24 Sep 2012 15:19:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 56FC0E5444 for ; Mon, 24 Sep 2012 15:19:07 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1348499831.c4703d79878e4e0eb8e2b36e49c0bdee835b847e.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/_global_updates.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c4703d79878e4e0eb8e2b36e49c0bdee835b847e X-VCS-Branch: master Date: Mon, 24 Sep 2012 15:19:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3ea52066-ca16-4610-b7f4-8b60cf35248e X-Archives-Hash: 39fd1fcbf1553b392d43c748857c4ec5 commit: c4703d79878e4e0eb8e2b36e49c0bdee835b847e Author: Zac Medico gentoo org> AuthorDate: Mon Sep 24 15:17:11 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Sep 24 15:17:11 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c4703d79 _global_updates: scan binarytree only if needed This will fix bug #436084. --- pym/portage/_global_updates.py | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py index c0f3df0..9ae734b 100644 --- a/pym/portage/_global_updates.py +++ b/pym/portage/_global_updates.py @@ -46,12 +46,6 @@ def _do_global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True): portdb = trees[root]["porttree"].dbapi vardb = trees[root]["vartree"].dbapi bindb = trees[root]["bintree"].dbapi - if not os.access(bindb.bintree.pkgdir, os.W_OK): - bindb = None - else: - # Call binarytree.populate(), since we want to make sure it's - # only populated with local packages here (getbinpkgs=0). - bindb.bintree.populate() world_file = os.path.join(mysettings['EROOT'], WORLD_FILE) world_list = grabfile(world_file) @@ -120,6 +114,14 @@ def _do_global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True): if myupd: retupd = True + if retupd: + if os.access(bindb.bintree.pkgdir, os.W_OK): + # Call binarytree.populate(), since we want to make sure it's + # only populated with local packages here (getbinpkgs=0). + bindb.bintree.populate() + else: + bindb = None + master_repo = portdb.getRepositoryName(portdb.porttree_root) if master_repo in repo_map: repo_map['DEFAULT'] = repo_map[master_repo]