]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
pakfire: Drop empty pakfire_build_setup function
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 16 Aug 2022 16:02:43 +0000 (16:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 16 Aug 2022 16:02:43 +0000 (16:02 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c
src/libpakfire/include/pakfire/pakfire.h
src/libpakfire/pakfire.c

index 460b0f62c313e5925592071e57ad463311a6282b..f142c63f2815090c7a15f2e2eef4a3a868c5ea34 100644 (file)
@@ -1132,11 +1132,6 @@ PAKFIRE_EXPORT int pakfire_build_exec(struct pakfire_build* build, const char* p
                goto ERROR;
        }
 
-       // Setup build environment
-       r = pakfire_build_setup(build->pakfire);
-       if (r)
-               goto ERROR;
-
        const char* packages[] = {
                path, NULL
        };
@@ -1285,11 +1280,6 @@ ERROR:
 PAKFIRE_EXPORT int pakfire_shell(struct pakfire* pakfire, const char** packages) {
        int r;
 
-       // Setup build environment
-       r = pakfire_build_setup(pakfire);
-       if (r)
-               return r;
-
        // Install any additional packages
        if (packages) {
                r = pakfire_install(pakfire, 0, 0, packages, NULL, 0, NULL, NULL, NULL);
index de3d403ac772f4e0ec4bdab51e512744c9e72126..3316c33b130d4d2249d2d323f8cde6aa39a5c940 100644 (file)
@@ -183,9 +183,6 @@ struct pakfire_repo* pakfire_get_installed_repo(struct pakfire* pakfire);
 struct archive* pakfire_make_archive_disk_reader(struct pakfire* pakfire, int internal);
 struct archive* pakfire_make_archive_disk_writer(struct pakfire* pakfire, int internal);
 
-// Build Stuff
-int pakfire_build_setup(struct pakfire* pakfire);
-
 #endif
 
 #endif /* PAKFIRE_PAKFIRE_H */
index 8151a0bc6204766f84b96e42a7dc46a0d9607567..8e30665d9e70ebd0794ac44d6b2f2a04b9eba284 100644 (file)
@@ -119,7 +119,6 @@ struct pakfire {
        gpgme_ctx_t gpgctx;
 
        // States
-       int build_setup:1;
        int destroy_on_free:1;
        int pool_ready:1;
        int in_free:1;
@@ -1927,22 +1926,3 @@ PAKFIRE_EXPORT int pakfire_sync(struct pakfire* pakfire, int solver_flags, int f
        return pakfire_perform_transaction_simple(pakfire, solver_flags,
                pakfire_request_sync, flags, changed, status_callback, status_callback_data);
 }
-
-// Build Stuff
-
-int pakfire_build_setup(struct pakfire* pakfire) {
-       // This function can only be called when in build mode
-       if (!pakfire_has_flag(pakfire, PAKFIRE_FLAGS_BUILD)) {
-               errno = EINVAL;
-               return 1;
-       }
-
-       // Do nothing if build environment has been set up
-       if (pakfire->build_setup)
-               return 0;
-
-       // Build setup done
-       pakfire->build_setup = 1;
-
-       return 0;
-}