Rev 2203 (rev 2097 on the 2.8 branch) created a regression such that

cache files will be written out even if the '--skip-bad-cache' option
is given and the cached features file differs from the features of
the currently running kernel. The patch below fixes the regression.

From: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
John Johansen 2013-10-14 01:51:21 -07:00
parent 3d8c3806e2
commit 19a1f0aa8c

View file

@ -1272,7 +1272,7 @@ static int create_cache(const char *cachedir, const char *path,
struct stat stat_file;
FILE * f = NULL;
if (cond_clear_cache && clear_cache_files(cacheloc) != 0)
if (clear_cache_files(cacheloc) != 0)
goto error;
create_file:
@ -1347,7 +1347,7 @@ static void setup_flags(void)
get_flags_string(&cache_flags, cache_features_path);
if (cache_flags) {
if (strcmp(flags_string, cache_flags) != 0) {
if (write_cache) {
if (write_cache && cond_clear_cache) {
if (create_cache(cacheloc, cache_features_path,
flags_string))
skip_read_cache = 1;