Skip to content
Snippets Groups Projects
Verified Commit 2731b75d authored by Davide Gardenal's avatar Davide Gardenal
Browse files

upgrade_oniro.py: create script and description


Signed-off-by: Davide Gardenal's avatarDavide Gardenal <davide.gardenal@huawei.com>
parent 73f56a5b
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# A tool to upgrade to a newer version of Oniro
# Steps to upgrade:
# 1. Get the input from the user:
# 1.1. Target version
# 1.2. Build directory, can be empty or not and this will define some additional checks to perform
# 1.3. Machine and target to build, in order to test the upgraded build we need to know these things
# 1.4. Optional: Conf directory path, this can be specified in order to use a specific config directory.
# In case we have a clean build directory and this is not specified the default config will be used.
# 1.5. Optional: Flavour. In case the conf directory is not specified and the build directory is empty it becomes mandatory
# 1.6. Some other stuff to control the output of the tool (TBD)
#
# 2. Check for tool updates. If the newest version of Oniro has a new version of this script it should be upgraded before
# Oniro's upgrade, then it should be run instead of the old one.
#
# 3. Pre-upgrade checks:
# 3.1. Check if "Target version" is newer than the current
# 3.2. Check if all the layers in the sample of Oniro are checked out in the correct state.
# 3.4. If the build directory is non-empty check if bblayers.conf have some additional layers, if positive flag them for the config update.
# 3.5. Flag all the .bbappends for update
#
# 4. Pre-upgrade backup to ensure that if something goes wrong we can restore a good state of the build.
# Option to also backup the build (tmp dir excluded) if the build directory is not empty.
#
# 5. Update:
# 5.1. Sync the repos
# 5.2. Update the .bbappends files (needs user confirmation) if needed
# 5.2. Run the script to init the environment
# 5.3. If specified copy the conf directory
# 5.4. Update the configs
# 5.5. If present delete the tmp directory
# 5.6. Build the target
# 6. In case of error let the user know that they can restore the old version using this tool
# 7. In case of a successful upgrade print/dump some additional information about the upgrade (CVE diff, buildhistory, ...)
if __name__ == "__main__":
print("test")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment