static int pakfire_build_find_provides(
struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
struct pakfire_find_deps_ctx* deps = data;
- const char* path = NULL;
int r;
- // Fetch the file path
- path = pakfire_file_get_path(file);
- if (!path)
- return -EINVAL;
-
// Skip debug files
- if (pakfire_path_match("/usr/lib/debug/**", path))
+ if (pakfire_file_matches(file, "/usr/lib/debug/**"))
return 0;
// Skip debug sources
- else if (pakfire_path_match("/usr/src/debug/**", path))
+ else if (pakfire_file_matches(file, "/usr/src/debug/**"))
return 0;
// Handle pkg-config files
- else if (pakfire_path_match("**.pc", path))
+ else if (pakfire_file_matches(file ,"**.pc"))
return pakfire_build_find_pkgconfig_provides(ctx, file, deps);
// Split certain file types differently
static int pakfire_build_find_requires(
struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
struct pakfire_find_deps_ctx* deps = data;
- const char* path = NULL;
int r;
- // Fetch the file path
- path = pakfire_file_get_path(file);
- if (!path)
- return -EINVAL;
-
// Skip debug files
- if (pakfire_path_match("/usr/lib/debug/**", path))
+ if (pakfire_file_matches(file, "/usr/lib/debug/**"))
return 0;
// Skip debug sources
- else if (pakfire_path_match("/usr/src/debug/**", path))
+ else if (pakfire_file_matches(file, "/usr/src/debug/**"))
return 0;
// Handle pkg-config files
- else if (pakfire_path_match("**.pc", path))
+ else if (pakfire_file_matches(file, "**.pc"))
return pakfire_build_find_pkgconfig_requires(ctx, file, deps);
// Split certain file types differently
// Directories
case S_IFDIR:
// Handle Python ABI
- if (pakfire_path_match("/usr/lib*/python*", path)) {
+ if (pakfire_file_matches(file, "/usr/lib*/python*")) {
r = pakfire_build_find_python_abi_requires(ctx, file, deps);
if (r < 0)
return r;