summaryrefslogtreecommitdiffstats
path: root/mkosi.images
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-14 16:51:11 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-08-15 08:48:12 +0200
commit0409213cbc1f939b6f2f72deabc4c92a7fe30523 (patch)
tree54c974fa98f7df63ffae5f15805362e9e0809c17 /mkosi.images
parentudev: Handle PTP device symlink properly on udev action 'change' (diff)
downloadsystemd-0409213cbc1f939b6f2f72deabc4c92a7fe30523.tar.xz
systemd-0409213cbc1f939b6f2f72deabc4c92a7fe30523.zip
mkosi: Fix debian/not-installed build logic
- Expand globs - Filter out directories - Append to the list of packaged files, not the list of installed files Fixes the issue in https://github.com/systemd/systemd/pull/32363
Diffstat (limited to 'mkosi.images')
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot14
1 files changed, 9 insertions, 5 deletions
diff --git a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot
index 2d50afbbb4..03b3b049eb 100755
--- a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot
+++ b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot
@@ -102,18 +102,22 @@ if ! build; then
sed "s/Package: //" |
xargs -d '\n' -I {} sh -c "[ -d debian/{} ] && (cd debian/{} && find . ! -type d ! -path "*dh-exec*" -printf '%P\n')" |
# Remove compression suffix from compressed manpages as the manpages in debian/tmp will be uncompressed.
- sed --regexp-extended 's/([0-9])\.gz$/\1/' |
- sort --unique >/tmp/packaged-files
+ sed --regexp-extended 's/([0-9])\.gz$/\1/' >/tmp/packaged-files
# We figure out the installed files by running find on debian/tmp/ which contains the files installed
# by meson install.
- (cd debian/tmp/ && find . ! -type d ! -path "*dh-exec*" -printf '%P\n') >/tmp/installed-files
+ (cd debian/tmp/ && find . ! -type d ! -path "*dh-exec*" -printf '%P\n' | sort --unique) >/tmp/installed-files
if [[ -f debian/not-installed ]]; then
- grep --invert-match "^#" debian/not-installed >>/tmp/installed-files
+ pushd debian/tmp
+ grep --invert-match "^#" ../not-installed |
+ xargs -I {} bash -O nullglob -c "printf '%s\n' {}" |
+ sed "/^$/d" |
+ xargs -I {} sh -c "test -f '{}' && echo '{}' || true" >>/tmp/packaged-files
+ popd
fi
- sort --unique --output /tmp/installed-files /tmp/installed-files
+ sort --unique --output /tmp/packaged-files /tmp/packaged-files
# We get all the installed files that were not packaged by finding entries in the installed file that are
# not in the packaged file.