From 85ef4e5eca22f1148e2870eec0f445316ff98283 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 c0f003aa26..52d4a4d115 100644 --- a/lib/files.cf +++ b/lib/files.cf @@ -1585,6 +1585,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 a90a2cd91baca07dfeadb064966fb0ce93e7a54c 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 2cf227d29a..7d952f252c 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::