From 232e0e19dbd4d8624330537ee32d894b434462fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 15 Sep 2024 16:57:47 +0200 Subject: [PATCH] Make sure that the generator is only active on merged systems There are rpms which have files in /usr/bin which would trigger the condition in the generator, even when building on an unmerged system, and the package would have Requires:filesystem(unmerged-sbin-symlinks). The corresponding Provides is actually only generated when filesystem itself is built with the merge, so effectively the package with the Requires would become uninstallable. --- filesystem.req | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/filesystem.req b/filesystem.req index 985749b..76dceee 100755 --- a/filesystem.req +++ b/filesystem.req @@ -7,6 +7,10 @@ # this out and we need a hardcoded list. sbin_filenames=${1:?} + +# Do nothing if the build system is not merged. +test -L /usr/sbin || exit 0 + declare -A "filenames=($(sed 's/.*/["\0"]=1/' <"${sbin_filenames}"))" while read -r path; do