build-pkgs: Fixed the deb packages missing issue after reuse
The '--reuse|--reuse_maximum' feature mirrors the remote
shared repository and imports all debs from the mirror
to the local repository, there are no deb packages in the
local build directory for the reused packages which make
some tasks like building docker images and secure boot
signing fail for the missing deb packages.
This commit supports the below functions to fix the above
issues:
a. If '--dl_reused' option is enabled for option '--reuse'
or '--reuse_maximum', all the reused deb packages will be
downloaded to their local build directory.
b. 'never_reuse.lst' will be checked and the packages listed
in it will be built locally instead of reusing them if the
option '--reuse' is enabled. And it will be ignored if the
option '--reuse_maximum' is enabled.
Test Plan:
Pass: build-pkgs (make sure the normal build-pkgs works)
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --reuse
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --reuse --dl_reused
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --clean --reuse --dl_reused
Run the secure boot signing script
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --clean --reuse --dl_reused build-pkgs (Make sure this build will not build from scratch)
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --clean --reuse_maximum --dl_reused
Pass: export STX_SHARED_REPO=<url to shard repo>
export STX_SHARED_SOURCE=<url to shared source> build-pkgs --reuse_maximum --dl_reused
Reviewed: https:/ /review. opendev. org/c/starlingx /root/+ /882338 /opendev. org/starlingx/ root/commit/ add2c84a28ed7b3 71c0c20ab1be1a5 5e0ca7410f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit add2c84a28ed7b3 71c0c20ab1be1a5 5e0ca7410f
Author: hqbai <email address hidden>
Date: Thu May 4 10:33:40 2023 +0800
build-pkgs: Fixed the deb packages missing issue after reuse
The '--reuse| --reuse_ maximum' feature mirrors the remote
shared repository and imports all debs from the mirror
to the local repository, there are no deb packages in the
local build directory for the reused packages which make
some tasks like building docker images and secure boot
signing fail for the missing deb packages.
This commit supports the below functions to fix the above
issues:
a. If '--dl_reused' option is enabled for option '--reuse'
or '--reuse_maximum', all the reused deb packages will be
downloaded to their local build directory.
b. 'never_reuse.lst' will be checked and the packages listed
in it will be built locally instead of reusing them if the
option '--reuse' is enabled. And it will be ignored if the
option '--reuse_maximum' is enabled.
Test Plan: REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --reuse REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --reuse --dl_reused REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --clean --reuse --dl_reused REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --clean --reuse --dl_reused
build- pkgs (Make sure this build will not build from scratch) REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --clean --reuse_maximum --dl_reused REPO=<url to shard repo> SOURCE= <url to shared source>
build- pkgs --reuse_maximum --dl_reused
Pass: build-pkgs (make sure the normal build-pkgs works)
Pass: export STX_SHARED_
export STX_SHARED_
Pass: export STX_SHARED_
export STX_SHARED_
Pass: export STX_SHARED_
export STX_SHARED_
Run the secure boot signing script
Pass: export STX_SHARED_
export STX_SHARED_
Pass: export STX_SHARED_
export STX_SHARED_
Pass: export STX_SHARED_
export STX_SHARED_
Partial-Bug: 2017763
Signed-off-by: hqbai <email address hidden> 262dde12befb0b1 6367e261968
Change-Id: I8cd84dbe6fe8f0