From 2c4d230d7a09ad8940538338dfdc8bc3212fbc20 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 20 Jan 2023 16:04:27 +1100 Subject: [PATCH] cache-url: Give up on curl install for Redhat platforms The RedHat platforms vary if they come pre-installed with curl or curl-minimal. For example, Fedora 37 container images have curl, and centos 9-stream and Rocky images have curl-minimal. If you try and install curl when curl-minimal is installed, you get an error, and vice-versa. Unfortunately package-installs can't really sort this out; we're just passing a package list to the system package manager. We don't have a way to say "the curl OR curl-minimal package is fine". As this breaks builds and is such a common dependency that it's already there, let's just add a note that curl is required and blank out the package-map. Change-Id: I9ccebe2dbf3a8682dab60c2070c5f78849e01446 --- diskimage_builder/elements/cache-url/README.rst | 6 ++++++ diskimage_builder/elements/cache-url/pkg-map | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/diskimage_builder/elements/cache-url/README.rst b/diskimage_builder/elements/cache-url/README.rst index 5d30c9ac..ec00c7ee 100644 --- a/diskimage_builder/elements/cache-url/README.rst +++ b/diskimage_builder/elements/cache-url/README.rst @@ -1,4 +1,10 @@ ========= cache-url ========= + A helper script to download images into a local cache. + +**NOTE** : on RedHat platforms, ensure the curl binary is available. +Due to conflicting differences in platform usage of ```curl-minimal`` +and ```curl``, the usual package dependency methods do not work for +this package. diff --git a/diskimage_builder/elements/cache-url/pkg-map b/diskimage_builder/elements/cache-url/pkg-map index fa4fd956..bde555be 100644 --- a/diskimage_builder/elements/cache-url/pkg-map +++ b/diskimage_builder/elements/cache-url/pkg-map @@ -1,4 +1,9 @@ { + "family": { + "redhat": { + "curl": "" + } + }, "distro": { "gentoo": { "curl": "net-misc/curl"