Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: /
Date: Sat, 28 Nov 2015 02:44:42
Message-Id: 1448655010.f031a1315e1363857959cdae24414a7845cc1660.vapier@gentoo
1 commit: f031a1315e1363857959cdae24414a7845cc1660
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 27 20:10:10 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 27 20:10:10 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f031a131
7
8 qcache: only warn once per missing cache file
9
10 When the cache is out of date, we can spam hundreds of lines.
11 Only do it once.
12
13 qcache.c | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
15
16 diff --git a/qcache.c b/qcache.c
17 index 9e41c3c..fed3534 100644
18 --- a/qcache.c
19 +++ b/qcache.c
20 @@ -578,9 +578,14 @@ int qcache_traverse(void (*func)(qcache_data*))
21 func(&data);
22
23 qcache_free_data(data.cache_data);
24 - } else
25 - warnp("unable to read cache '%s'\n"
26 - "\tperhaps you need to `egencache -j 4` ?", cachepath);
27 + } else {
28 + static bool warned = false;
29 + if (!warned) {
30 + warned = true;
31 + warnp("unable to read cache '%s'\n"
32 + "\tperhaps you need to `egencache -j 4` ?", cachepath);
33 + }
34 + }
35
36 free(ebuilds[k]);
37 free(cachepath);