summaryrefslogtreecommitdiffstats
path: root/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:20:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:20:44 +0000
commitca5ecaae7a8f75e18ba85b29839752da76e3b7b9 (patch)
tree6f62ddc7fbe8ae132441a0b25e2a76e423e66e9f /mkosi.conf.d/10-debian-ubuntu/mkosi.prepare
parentReleasing progress-linux version 256.2-1~progress7.99u1. (diff)
downloadsystemd-ca5ecaae7a8f75e18ba85b29839752da76e3b7b9.tar.xz
systemd-ca5ecaae7a8f75e18ba85b29839752da76e3b7b9.zip
Merging upstream version 256.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mkosi.conf.d/10-debian-ubuntu/mkosi.prepare')
-rwxr-xr-xmkosi.conf.d/10-debian-ubuntu/mkosi.prepare16
1 files changed, 16 insertions, 0 deletions
diff --git a/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare b/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare
new file mode 100755
index 0000000..acab113
--- /dev/null
+++ b/mkosi.conf.d/10-debian-ubuntu/mkosi.prepare
@@ -0,0 +1,16 @@
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
+
+if [[ "$1" == "build" ]]; then
+ exit 0
+fi
+
+mapfile -t PACKAGES < <(jq --raw-output .VolatilePackages[] <"$MKOSI_CONFIG")
+
+apt-cache depends "${PACKAGES[@]}" |
+ grep --invert-match --regexp "<" --regexp "|" --regexp systemd | # Remove e.g. <python3:any> and |dbus-broker like results
+ grep --extended-regexp "Depends|Suggests|Recommends" |
+ sed --quiet 's/.*: //p' | # Get every line with ": " in it and strip it at the same time.
+ sort --unique |
+ xargs --delimiter '\n' --no-run-if-empty mkosi-install