Commit 6eb27b55 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

capture-libs: Skip libs with unmet dependencies when "if exists" flag is set

If we have the CAPTURE_FLAG_IF_EXISTS option flag, we should not
propagate an error if we are not able to find some dependencies of a
library. Instead we should just skip it.

This fixes an error that some users reported because they had some
leftovers unused libraries in their system and libcapsule reported an
error while trying to capture their (missing) dependencies.
Signed-off-by: Ludovico de Nittis's avatarLudovico de Nittis <>
parent 77a60a70
Pipeline #17513 passed with stage
in 8 minutes and 46 seconds
......@@ -375,8 +375,19 @@ capture_one( const char *soname, const capture_options *options,
return false;
if( !ld_libs_find_dependencies( &provider, code, message ) )
if( !ld_libs_find_dependencies( &provider, &local_code, &local_message ) )
if( ( options->flags & CAPTURE_FLAG_IF_EXISTS ) && local_code == ENOENT )
"Some of the dependencies for %s have not been found, ignoring",
soname );
_capsule_clear( &local_message );
return true;
_capsule_propagate_error( code, message, local_code,
_capsule_steal_pointer( &local_message ) );
return false;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment