From 4fb32c570fcc9d93581d6abc44004bae01ac2229 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Thu, 17 Mar 2016 19:43:25 +0000 Subject: [PATCH] Replace explicit os-core subtraction Now that much of the includes plumbing present on the output/subtract side, make sure all non os-core manifests explicitly include os-core, and then use the new extra semantics of subtract_manifests() to subtract all included bundles, not just os-core. --- src/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index b584b41..8f4d53a 100644 --- a/src/main.c +++ b/src/main.c @@ -388,7 +388,7 @@ int main(int argc, char **argv) while (name_includes) { char *name = name_includes->data; name_includes = g_list_next(name_includes); - manifest_includes = g_list_prepend(manifest_includes, g_hash_table_lookup(new_manifests, name)); + manifest_includes = g_list_prepend(manifest_includes, g_hash_table_lookup(old_manifests, name)); } manifest->includes = manifest_includes; } @@ -415,9 +415,13 @@ int main(int argc, char **argv) apply_heuristics(newm); newm->prevversion = oldm->version; + /* add os-core as an included manifest */ + oldm->includes = g_list_prepend(oldm->includes, old_core); + newm->includes = g_list_prepend(newm->includes, new_core); + /* Step 5: Subtract the core files from the manifest */ - subtract_manifests_frontend(oldm, old_core); - subtract_manifests_frontend(newm, new_core); + subtract_manifests_frontend(oldm, oldm); + subtract_manifests_frontend(newm, newm); /* Step 6: Compare manifest to the previous version... */ if (match_manifests(oldm, newm) == 0) {