diff --git a/modules/rpm-ostree/README.md b/modules/rpm-ostree/README.md index 7c44777..398bdc7 100644 --- a/modules/rpm-ostree/README.md +++ b/modules/rpm-ostree/README.md @@ -6,7 +6,7 @@ The module first downloads the repository files from repositories declared under Then the module installs the packages declared under `install:` using `rpm-ostree install`, it removes the packages declared under `remove:` using `rpm-ostree override remove`. If there are packages declared under both `install:` and `remove:` a hybrid command `rpm-ostree remove --install ` is used, which should allow you to switch required packages for other ones. -Installing RPM packages directly from a `http(s)` url that points to the RPM file is also supported, you can just put the URLs under `install:` and they'll be installed along with the other packages. +Installing RPM packages directly from a `http(s)` url that points to the RPM file is also supported, you can just put the URLs under `install:` and they'll be installed along with the other packages. The magic string `%OS_VERSION%` is substituted with the current VERSION_ID (major Fedora version) like with the `repos:` property. :::note [Removed packages are still present in the underlying ostree repository](https://coreos.github.io/rpm-ostree/administrator-handbook/#removing-a-base-package), what `remove` does is kind of like hiding them from the system, it doesn't free up storage space. @@ -21,4 +21,4 @@ When removing certain packages, some problem probably in upstream `rpm-ostree` c Resolving dependencies...done error: Could not depsolve transaction; 1 problem detected: Problem: conflicting requests -``` \ No newline at end of file +``` diff --git a/modules/rpm-ostree/rpm-ostree.sh b/modules/rpm-ostree/rpm-ostree.sh index 50384a1..021cd4c 100644 --- a/modules/rpm-ostree/rpm-ostree.sh +++ b/modules/rpm-ostree/rpm-ostree.sh @@ -37,8 +37,9 @@ get_yaml_array REMOVE '.remove[]' "$1" if [[ ${#INSTALL[@]} -gt 0 ]]; then for PKG in "${INSTALL[@]}"; do if [[ "$PKG" =~ ^https?:\/\/.* ]]; then - echo "Installing directly from URL: ${PKG}" - rpm-ostree install "$PKG" + REPLACED_PKG="${PKG//%OS_VERSION%/${OS_VERSION}}" + echo "Installing directly from URL: ${REPLACED_PKG}" + rpm-ostree install "$REPLACED_PKG" INSTALL=( "${INSTALL[@]/$PKG}" ) # delete URL from install array fi done