feat: Add support for using %OS_VERSION% in install url (#260)
This commit is contained in:
commit
b7de5f34ce
2 changed files with 5 additions and 4 deletions
|
|
@ -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 <packages> --install <packages>` 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
|
||||
```
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue