]> git.ipfire.org Git - pakfire.git/commitdiff
build: Permit to uninstall or downgrade packages in installcheck
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Feb 2025 16:03:05 +0000 (16:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Feb 2025 16:04:12 +0000 (16:04 +0000)
Whenever we have a snapshot loaded, the solver might want to have a
little bit more liberty to find a solution. As we give it that liberty
later, we should not let the install check become a barrier.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/build.c

index e30819387d418f3f3579e21b12f1d9e22ccea8a9..995f8cb45dea9c5bb13eaa04dbb23f922ccf299d 100644 (file)
@@ -2458,7 +2458,8 @@ int pakfire_build_exec(struct pakfire_build* build, const char* path,
        }
 
        // Perform an install check to see whether we can build this at all
-       r = pakfire_package_installcheck(package, &problems, 0);
+       r = pakfire_package_installcheck(package, &problems,
+                       PAKFIRE_TRANSACTION_ALLOW_UNINSTALL|PAKFIRE_TRANSACTION_ALLOW_DOWNGRADE);
        if (r) {
                ERROR(build->ctx, "Cannot build %s:\n%s\n", nevra, problems);
                goto ERROR;