SameerMesiah97 commented on code in PR #77420:
URL: https://github.com/apache/airflow/pull/77420#discussion_r4652334990
##########
scripts/in_container/install_mermaid_cli.sh:
##########
@@ -25,9 +25,31 @@ set -euo pipefail
MERMAID_CLI_VERSION="11.17.0"
+function align_image_packages_with_hardened_repository() {
Review Comment:
You could extract this into a shared shell helper.
##########
scripts/in_container/install_mermaid_cli.sh:
##########
@@ -25,9 +25,31 @@ set -euo pipefail
MERMAID_CLI_VERSION="11.17.0"
+function align_image_packages_with_hardened_repository() {
+ # Chromium pulls in libraries (libx11-xcb1) that depend on the exact
dhi.io version of packages
+ # the image already has. When dhi.io has renumbered those since the
image's OS dependencies were
+ # installed, apt refuses to downgrade the image's copy and the install
fails. This repeats the
+ # function of the same name in scripts/docker/install_os_dependencies.sh,
which explains the
+ # renumbering and only runs when the OS dependencies are installed, not on
this later apt run.
+ local package
+ local dhi_version
+ local -a downgrades=()
+ while read -r package; do
+ dhi_version=$(apt-cache madison "${package}" | awk -F' [|] ' '$3 ~
/dhi\.io/ && !found {print $2; found=1}')
+ if [[ -n "${dhi_version}" ]]; then
+ downgrades+=("${package}=${dhi_version}")
+ fi
+ done < <(apt list --installed 2>/dev/null | awk -F/ '/\[installed,local\]/
{print $1}')
Review Comment:
Isnt the all locally installed packages scope a bit too broad? Why not limit
the alignment to the packages involved in the Chromium dependency conflict?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]