From 2ff1308edf4fe07bf18681ac71fc9e61ed4a4d89 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Tue, 12 Dec 2023 12:08:21 -0600 Subject: [PATCH 1/2] Added no_backup_cp_compare copy_from body to stdlib Like the existing no_backup_cp this copy_from body is used to copy files locally without making backups but with the additional ability to specify the comparison used. Ticket: ENT-10962 Changelog: commit (cherry picked from commit fcc64a6b303a1f4faf1be2866bddfc446f875187) --- lib/files.cf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/files.cf b/lib/files.cf index 376a27861d..5122e4e32d 100644 --- a/lib/files.cf +++ b/lib/files.cf @@ -1616,6 +1616,19 @@ body copy_from no_backup_cp(from) ## +body copy_from no_backup_cp_compare(from, comparison) +# @brief Copy a local file (`from`) based on comparison (`comparison`) and don't make any backup of the previous version +# +# @param from The path to the source file. +# @param comparison The comparison to use. (mtime|ctime|atime|exists|binary|hash|digest) +{ + source => "$(from)"; + copy_backup => "false"; + compare => "$(comparison)"; +} + +## + body copy_from no_backup_dcp(from) # @brief Copy a local file if contents have changed, and don't make any backup # of the previous version From 32d71de39628369743021807f0f4365f7de29b52 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Tue, 12 Dec 2023 12:11:22 -0600 Subject: [PATCH 2/2] Fixed restoration of Mission Portal application to packaged content when modified Prior to this change if Mission Portal application code was modified it would not be returned to the packaged state because the deployed code would have a newer timestamp than the packaged source. This change switches to using binary comparison of Mission Portal to it's packaged source to determine if the deployed application should be reverted. Ticket: ENT-10962 Changelog: Title (cherry picked from commit d37dedda02ce2e445c2a788edf465236c7542859) --- cfe_internal/enterprise/CFE_knowledge.cf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfe_internal/enterprise/CFE_knowledge.cf b/cfe_internal/enterprise/CFE_knowledge.cf index f95776842b..deae28e29d 100644 --- a/cfe_internal/enterprise/CFE_knowledge.cf +++ b/cfe_internal/enterprise/CFE_knowledge.cf @@ -43,7 +43,7 @@ bundle agent cfe_internal_setup_knowledge "$(cfe_internal_hub_vars.docroot)" comment => "Copy the basic knowledge base configuration from the installation to doc root", handle => "cfe_internal_setup_knowledge_files_doc_root_1", - copy_from => no_backup_cp("$(sys.workdir)/share/GUI"), + copy_from => no_backup_cp_compare("$(sys.workdir)/share/GUI", "binary"), depth_search => recurse("inf"); any::