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 74ED71388C2 for ; Sat, 28 Nov 2015 02:44:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E07C021C08A; Sat, 28 Nov 2015 02:44:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A0CB621C042 for ; Sat, 28 Nov 2015 02:44:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA1DE3406C2 for ; Sat, 28 Nov 2015 02:44:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D04A6E6C for ; Sat, 28 Nov 2015 02:44:34 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1448655010.f031a1315e1363857959cdae24414a7845cc1660.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qcache.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: f031a1315e1363857959cdae24414a7845cc1660 X-VCS-Branch: master Date: Sat, 28 Nov 2015 02:44:34 +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: d8ea65f8-1b60-498d-bbab-06800e03d629 X-Archives-Hash: 8695a2797aaa827240938cb3b7926d5a commit: f031a1315e1363857959cdae24414a7845cc1660 Author: Mike Frysinger gentoo org> AuthorDate: Fri Nov 27 20:10:10 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Nov 27 20:10:10 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f031a131 qcache: only warn once per missing cache file When the cache is out of date, we can spam hundreds of lines. Only do it once. qcache.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qcache.c b/qcache.c index 9e41c3c..fed3534 100644 --- a/qcache.c +++ b/qcache.c @@ -578,9 +578,14 @@ int qcache_traverse(void (*func)(qcache_data*)) func(&data); qcache_free_data(data.cache_data); - } else - warnp("unable to read cache '%s'\n" - "\tperhaps you need to `egencache -j 4` ?", cachepath); + } else { + static bool warned = false; + if (!warned) { + warned = true; + warnp("unable to read cache '%s'\n" + "\tperhaps you need to `egencache -j 4` ?", cachepath); + } + } free(ebuilds[k]); free(cachepath);