root/build-tools/stx/patch/constants.py
Dostoievski Batista a1a167bb71 Change scripts names in the patch's metadata
When adding a pre-install or post-install script to the patch, we rename
it to "pre-install.sh" or "post-install.sh" to facilitate the use of the
patch afterwards. This change makes the metadata inside the patch
reflect this. Together with this change we move PATCH_SCRIPTS constant
to separate file as the same will be call in different files.

Test plan:
    PASS: Create patch without any scripts
    PASS: Create patch with only pre-install script
    PASS: Create patch with only post-install script
    PASS: Create patch with all scripts
    PASS: Install patch with all scripts in a running AIO-SX,
    check if scripts are present in /opt/software/software-scripts/
    PASS: Delete patch with all scripts in a running AIO-SX,
    check if scripts are not present in /opt/software/software-scripts/

Story: 2010676
Task: 50926

Change-Id: I639ff15e306ec69ed1bbbfea8c99aa96affa1dec
Signed-off-by: Dostoievski Batista <dostoievski.albinobatista@windriver.com>
2024-08-28 09:56:23 -03:00

13 lines
313 B
Python

#
# Copyright (c) 2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Default names for the script inside the patch
PATCH_SCRIPTS = {
"PRE_INSTALL": "pre-install.sh",
"POST_INSTALL": "post-install.sh",
"DEPLOY_PRECHECK": "deploy-precheck",
"UPGRADE_UTILS": "upgrade_utils.py",
}