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 <ludovico.denittis@collabora.com>
6 jobs for wip/denittis/missing_deps in 8 minutes and 3 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Test
manual build:arch #68657
allowed to fail manual
passed build:asan #68653

00:03:51

passed build:bionic #68656

00:07:56

passed build:buster #68655

00:07:32

passed build:stretch #68654

00:08:02

passed build:ubsan #68652

00:03:22