On Mon, Aug 13, 2012 at 02:06:12PM -0700, John Johansen wrote: > Add the ability to clear out the binary profile cache. This removes the > need to have a separate script to handle the logic of checking and > removing the cache if it is out of date. > > The parser already does all the checking to determine cache validity > so it makes sense to allow the parser to clear out inconsistent cache > when it has been instructed to update the cache. > > Signed-off-by: John Johansen <[email protected]>
Coming to this patch and the problem that drove it late, I both agree with the concept and sensible default :) as well as the implementation. I have one minor niggle (see below), but otherwise Acked-By: Steve Beattie <[email protected]> (I don't need another round of review on this patch). I particularly like the directory walking callback mechanism, and will try to convert the other locations where we walk directories to use it if someone else doesn't get to it first. > --- > parser/parser_main.c | 167 > ++++++++++++++++++++++++++++++++++++++++++------- > parser/tst/caching.sh | 33 +++++++++- > 2 files changed, 177 insertions(+), 23 deletions(-) > > diff --git a/parser/parser_main.c b/parser/parser_main.c > index f4b4640..474dc0a 100644 > --- a/parser/parser_main.c > +++ b/parser/parser_main.c [SNIP] > @@ -1256,6 +1376,11 @@ int main(int argc, char *argv[]) > return retval; > } > > + if (force_clear_cache) { > + clear_cache_files(basedir); > + exit(0); > + } > + clear_cache_files() returns a non-zero value if an error occurred. Presumably we shouldn't be dropping it and should propagate it in the exit() code. Also, thanks for adding testcases! Much appreciated! -- Steve Beattie <[email protected]> http://NxNW.org/~steve/
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
