From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BF231396D9 for ; Tue, 21 Nov 2017 20:10:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8954FE0F20; Tue, 21 Nov 2017 20:10:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A6EDE0F20 for ; Tue, 21 Nov 2017 20:10:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23B9F33D3CE for ; Tue, 21 Nov 2017 20:10:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9959DA2DA for ; Tue, 21 Nov 2017 20:10:50 +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: <1511294893.b1d467ad9984c8fb100aeccb7de084f395a099f4.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/binhost/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/emaint/modules/binhost/binhost.py X-VCS-Directories: pym/portage/emaint/modules/binhost/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b1d467ad9984c8fb100aeccb7de084f395a099f4 X-VCS-Branch: master Date: Tue, 21 Nov 2017 20:10:50 +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: 9c27ac2f-ac22-4051-b214-f830ba479ad2 X-Archives-Hash: 90b508b1101f11a758778b9517dd8660 commit: b1d467ad9984c8fb100aeccb7de084f395a099f4 Author: Zac Medico gentoo org> AuthorDate: Tue Nov 21 20:05:50 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Nov 21 20:08:13 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b1d467ad emaint binhost: use _populate_local return value when appropriate Since _populate_local does not write the Packages file to disk, its return value must be used because _load_pkgindex would return stale data. Fixes: 694419fc11af ("emaint binhost: use _populate_local instead of _populate (bug 638320)") Bug: https://bugs.gentoo.org/638320 pym/portage/emaint/modules/binhost/binhost.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/portage/emaint/modules/binhost/binhost.py b/pym/portage/emaint/modules/binhost/binhost.py index f18878c7c..1c9006386 100644 --- a/pym/portage/emaint/modules/binhost/binhost.py +++ b/pym/portage/emaint/modules/binhost/binhost.py @@ -122,14 +122,14 @@ class BinhostHandler(object): pkgindex_lock = locks.lockfile( self._pkgindex_file, wantnewlockfile=1) try: - # Repopulate with lock held. - bintree._populate_local() + # Repopulate with lock held. If _populate_local returns + # data then use that, since _load_pkgindex would return + # stale data in this case. + self._pkgindex = pkgindex = (bintree._populate_local() or + bintree._load_pkgindex()) cpv_all = self._bintree.dbapi.cpv_all() cpv_all.sort() - pkgindex = bintree._load_pkgindex() - self._pkgindex = pkgindex - # Recount stale/missing packages, with lock held. missing = [] stale = []