build_packages: Add flag to ignore some binary packages

When the ebuild file changed but not its version nor its cross-workon
commit, the binary package would be used. Also some dependencies are not
encoded to trigger a rebuild of depending packages.
Allow to exclude some binary packages so that we can be sure that they
are rebuilt.
This commit is contained in:
Kai Lüke 2020-05-07 15:50:58 +02:00
parent 74f04c59f7
commit 066deb9d09
No known key found for this signature in database
GPG Key ID: E5601DA3A1D902A8
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,8 @@ DEFINE_boolean usepkg "${FLAGS_TRUE}" \
"Use binary packages when possible." "Use binary packages when possible."
DEFINE_boolean usepkgonly "${FLAGS_FALSE}" \ DEFINE_boolean usepkgonly "${FLAGS_FALSE}" \
"Only use/download binary packages. Implies --noworkon" "Only use/download binary packages. Implies --noworkon"
DEFINE_string usepkg_exclude "" \
"Exclude these binary packages."
DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \ DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \
"Download binary packages from remote repository." "Download binary packages from remote repository."
DEFINE_string getbinpkgver "" \ DEFINE_string getbinpkgver "" \
@ -154,6 +156,9 @@ if [[ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]]; then
if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then if [[ "${FLAGS_getbinpkg}" -eq "${FLAGS_TRUE}" ]]; then
EMERGE_FLAGS+=( --getbinpkg ) EMERGE_FLAGS+=( --getbinpkg )
fi fi
if [[ -n "${FLAGS_usepkg_exclude}" ]]; then
EMERGE_FLAGS+=("--usepkg-exclude=${FLAGS_usepkg_exclude}")
fi
fi fi
if [[ "${FLAGS_jobs}" -ne -1 ]]; then if [[ "${FLAGS_jobs}" -ne -1 ]]; then

View File

@ -44,6 +44,7 @@ script setup_board \
script build_packages \ script build_packages \
--board="${BOARD}" \ --board="${BOARD}" \
--getbinpkgver=${RELEASE_BASE:-"${FLATCAR_VERSION}" --toolchainpkgonly} \ --getbinpkgver=${RELEASE_BASE:-"${FLATCAR_VERSION}" --toolchainpkgonly} \
--usepkg_exclude="${BINARY_PACKAGES_TO_EXCLUDE}" \
--skip_chroot_upgrade \ --skip_chroot_upgrade \
--skip_torcx_store \ --skip_torcx_store \
--sign="${SIGNING_USER}" \ --sign="${SIGNING_USER}" \