]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: ignore missing libudev when creating the test image
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 4 Aug 2023 16:02:01 +0000 (18:02 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 5 Aug 2023 04:32:17 +0000 (13:32 +0900)
Same scenario as with libsystemd - ldd might use unprefixed RPATH, and
we install our own stuff into the image unconditionally anyway.

Also, bail out early if we hit a missing DSO with a possibly helpful
message.

test/test-functions

index 908aeeef1b2e0ab6621beebbf828edd17a529786..76fdba5857c5a02b340bf206df158cd6f8ed2625 100644 (file)
@@ -2331,14 +2331,7 @@ inst_libs() {
         [[ "$line" = 'not a dynamic executable' ]] && break
         # Ignore errors about our own stuff missing. This is most likely caused
         # by ldd attempting to use the unprefixed RPATH.
-        [[ "$line" =~ libsystemd.*\ not\ found ]] && continue
-
-        if [[ "$line" =~ $so_regex ]]; then
-            file="${BASH_REMATCH[1]}"
-            [[ -e "${initdir:?}/$file" ]] && continue
-            inst_library "$file"
-            continue
-        fi
+        [[ "$line" =~ (libsystemd|libudev).*\ not\ found ]] && continue
 
         if [[ "$line" =~ not\ found ]]; then
             dfatal "Missing a shared library required by $bin."
@@ -2347,6 +2340,12 @@ inst_libs() {
             dfatal "Cannot create a test image."
             exit 1
         fi
+
+        if [[ "$line" =~ $so_regex ]]; then
+            file="${BASH_REMATCH[1]}"
+            [[ -e "${initdir:?}/$file" ]] && continue
+            inst_library "$file"
+        fi
     done < <(LC_ALL=C ldd "$bin" 2>/dev/null)
 }