goto ERROR;
}
- // Setup build environment
- r = pakfire_build_setup(build->pakfire);
- if (r)
- goto ERROR;
-
const char* packages[] = {
path, NULL
};
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);
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 */
gpgme_ctx_t gpgctx;
// States
- int build_setup:1;
int destroy_on_free:1;
int pool_ready:1;
int in_free:1;
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;
-}