]> git.ipfire.org Git - pakfire.git/commitdiff
build: Skip processing the filelist for empty packages
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2021 14:46:54 +0000 (14:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2021 14:46:54 +0000 (14:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index f269120228768c7e1968b3c45899de8c463316fb..8e8adc53ca9388259036c819df12e13a5b06ac9e 100644 (file)
@@ -257,6 +257,10 @@ static int pakfire_build_package_add_files(Pakfire pakfire, PakfireParser makefi
        const size_t length = pakfire_filelist_size(filelist);
        DEBUG(pakfire, "%zu file(s) found\n", length);
 
+       // Nothing to do if the filelist is empty
+       if (!length)
+               goto ERROR;
+
        // Find dependencies
        r = pakfire_build_find_dependencies(pakfire, pkg, filelist, buildroot);
        if (r) {