manifest: Don't process header actions anymore

Post_update_actions were not being executed so we don't need to parse them.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2019-03-26 15:39:08 -07:00
parent d4a9402ae9
commit 1abd798b44
3 changed files with 4 additions and 16 deletions
-2
View File
@@ -47,7 +47,6 @@ bool need_update_boot = false;
bool need_update_bootloader = false;
bool need_systemd_reexec = false;
bool update_complete = false;
struct list *post_update_actions = NULL;
bool ignore_orphans = true;
char *format_string = NULL;
char *path_prefix = NULL; /* must always end in '/' */
@@ -519,7 +518,6 @@ void free_globals(void)
free_string(&format_string);
free_string(&mounted_dirs);
free_string(&state_dir);
list_free_list(post_update_actions);
free_string(&bundle_to_add);
timelist_free(global_times);
global_times = NULL;
+4 -13
View File
@@ -90,7 +90,7 @@ static struct manifest *alloc_manifest(int version, char *component)
return manifest;
}
static struct manifest *manifest_from_file(int version, char *component, bool header_only, bool latest, bool is_mix)
static struct manifest *manifest_from_file(int version, char *component, bool header_only, bool is_mix)
{
FILE *infile;
char line[MANIFEST_LINE_MAXLEN], *c, *c2;
@@ -203,15 +203,6 @@ static struct manifest *manifest_from_file(int version, char *component, bool he
goto err_close;
}
}
if (latest && strncmp(component, "MoM", 3) == 0) {
if (strncmp(line, "actions:", 8) == 0) {
post_update_actions = list_prepend_data(post_update_actions, strdup_or_die(c));
if (!post_update_actions->data) {
warn("Unable to read post update action from Manifest.MoM. \
Another update or verify may be required.\n");
}
}
}
if (strncmp(line, "includes:", 9) == 0) {
includes = list_prepend_data(includes, strdup_or_die(c));
}
@@ -606,7 +597,7 @@ retry_load:
return NULL;
}
manifest = manifest_from_file(version, "MoM", false, latest, mix_exists);
manifest = manifest_from_file(version, "MoM", false, mix_exists);
if (manifest == NULL) {
if (retried == false) {
@@ -721,7 +712,7 @@ retry_load:
return NULL;
}
manifest = manifest_from_file(version, file->filename, header_only, false, file->is_mix);
manifest = manifest_from_file(version, file->filename, header_only, file->is_mix);
if (manifest == NULL) {
if (retried == false) {
@@ -753,7 +744,7 @@ struct manifest *load_manifest_full(int version, bool mix)
return NULL;
}
manifest = manifest_from_file(version, "full", false, false, false);
manifest = manifest_from_file(version, "full", false, false);
if (manifest == NULL) {
error("Failed to load %d Manifest.full\n", version);
-1
View File
@@ -105,7 +105,6 @@ extern bool update_complete;
extern bool need_update_boot;
extern bool need_update_bootloader;
extern bool need_systemd_reexec;
extern struct list *post_update_actions;
extern bool keepcache;
extern curl_off_t total_curl_sz;