diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:28:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:28:16 +0000 |
commit | 6341b7a467c18d6e03bf56e32d516ed3dca6e80c (patch) | |
tree | 84262c0a568a2d869b75c0cf165969b6b0e6ca27 /mkosi.conf.d/10-opensuse/mkosi.prepare | |
parent | Adding debian version 256.5-2. (diff) | |
download | systemd-6341b7a467c18d6e03bf56e32d516ed3dca6e80c.tar.xz systemd-6341b7a467c18d6e03bf56e32d516ed3dca6e80c.zip |
Merging upstream version 256.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mkosi.conf.d/10-opensuse/mkosi.prepare')
-rwxr-xr-x | mkosi.conf.d/10-opensuse/mkosi.prepare | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mkosi.conf.d/10-opensuse/mkosi.prepare b/mkosi.conf.d/10-opensuse/mkosi.prepare index 6ee0af2..728b502 100755 --- a/mkosi.conf.d/10-opensuse/mkosi.prepare +++ b/mkosi.conf.d/10-opensuse/mkosi.prepare @@ -6,18 +6,20 @@ if [[ "$1" == "build" ]]; then exit 0 fi +mapfile -t PACKAGES < <(jq --raw-output .VolatilePackages[] <"$MKOSI_CONFIG") + DEPS="" -while read -r PACKAGE; do +for PACKAGE in "${PACKAGES[@]}"; do # zypper's output is not machine readable so we make do with sed instead. DEPS="$DEPS\n$( zypper info --requires --recommends --suggests "$PACKAGE" | sed '/Requires/,$!d' | # Remove everything before Requires line sed --quiet 's/^ //p' # All indented lines have dependencies )" -done < <(jq --raw-output .VolatilePackages[] <"$MKOSI_CONFIG") +done echo -e "$DEPS" | - grep --invert-match --regexp systemd --regexp udev --regexp qemu | + grep --extended-regexp --invert-match --regexp "$(IFS=\| ; echo "${PACKAGES[*]}")" --regexp qemu | sort --unique | xargs --delimiter '\n' --no-run-if-empty mkosi-install |