From a5722a6212c551c9091295182d1587a9554c0493 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 19 Sep 2023 12:59:02 -0400 Subject: [PATCH] log and continue when .pc file can't be loaded Signed-off-by: Jason Hall --- pkg/build/package.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/build/package.go b/pkg/build/package.go index 673a6ae23..418bb6740 100644 --- a/pkg/build/package.go +++ b/pkg/build/package.go @@ -595,7 +595,7 @@ func generatePkgConfigDeps(pc *PackageBuild, generated *config.Dependencies) err return err } - if !strings.Contains(path, ".pc") { + if !strings.HasSuffix(path, ".pc") { return nil } @@ -614,7 +614,8 @@ func generatePkgConfigDeps(pc *PackageBuild, generated *config.Dependencies) err pkg, err := pkgconfig.Load(filepath.Join(pc.WorkspaceSubdir(), path)) if err != nil { - return err + pc.Logger.Printf("WARNING: Unable to load .pc file (%s) using pkgconfig: %v", path, err) + return nil } pcName := filepath.Base(path)