]> git.ipfire.org Git - pakfire.git/commitdiff
build: Use pakfire_relpath() to determine buildroot
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 21:39:08 +0000 (21:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 21:39:08 +0000 (21:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index c30ee120811917121cdda9f9c3a48de914aee9c6..455b91dbe74849da1361f57e8756e3d620822321 100644 (file)
@@ -1155,8 +1155,6 @@ static int pakfire_build_read_makefile(struct pakfire_build* build,
 
        struct pakfire_parser_error* error = NULL;
 
-       const char* root = pakfire_get_path(build->pakfire);
-
        const char* nevra = pakfire_package_get_nevra(package);
        const char* name  = pakfire_package_get_name(package);
 
@@ -1184,7 +1182,7 @@ static int pakfire_build_read_makefile(struct pakfire_build* build,
        }
 
        // Set BUILDROOT
-       const char* buildroot = pakfire_path_relpath(root, build->buildroot);
+       const char* buildroot = pakfire_relpath(build->pakfire, build->buildroot);
        if (buildroot)
                pakfire_parser_set(*parser, NULL, "BUILDROOT", buildroot, 0);