#include <pakfire/problem.h>
#include <pakfire/repo.h>
#include <pakfire/scriptlet.h>
-#include <pakfire/snapshot.h>
#include <pakfire/solution.h>
#include <pakfire/string.h>
#include <pakfire/transaction.h>
return pakfire_string_set(build->target, target);
}
-static int pakfire_build_install_packages(
- struct pakfire_build* build, int* snapshot_needs_update) {
+static int pakfire_build_install_packages(struct pakfire_build* build) {
struct pakfire_transaction* transaction = NULL;
char* problems = NULL;
int r;
goto ERROR;
}
- // If there are changes, we have to update the snapshot
- if (pakfire_transaction_count(transaction))
- *snapshot_needs_update = 1;
-
// Run the transaction
r = pakfire_transaction_run(transaction);
if (r)
return 0;
}
- const int use_snapshot = !pakfire_build_has_flag(build, PAKFIRE_BUILD_DISABLE_SNAPSHOT);
-
- // Tells us whether we need to (re-)create the snapshot
- int snapshot_needs_update = 0;
-
-#if 0
- // Extract snapshot
- if (use_snapshot) {
- r = pakfire_snapshot_restore(build->pakfire);
- if (r)
- return r;
- }
-#endif
-
// Install or update any build dependencies
- r = pakfire_build_install_packages(build, &snapshot_needs_update);
+ r = pakfire_build_install_packages(build);
if (r)
return r;
-#if 0
- // Update the snapshot if there were changes
- if (use_snapshot && snapshot_needs_update) {
- // Store the snapshot
- r = pakfire_snapshot_store(build->pakfire);
- if (r)
- return r;
- }
-#endif
-
// Mark as ready
build->state = PAKFIRE_BUILD_READY;
enum pakfire_build_flags {
PAKFIRE_BUILD_INTERACTIVE = (1 << 0),
- PAKFIRE_BUILD_DISABLE_SNAPSHOT = (1 << 1),
- PAKFIRE_BUILD_DISABLE_CCACHE = (1 << 2),
- PAKFIRE_BUILD_DISABLE_TESTS = (1 << 3),
+ PAKFIRE_BUILD_DISABLE_CCACHE = (1 << 1),
+ PAKFIRE_BUILD_DISABLE_TESTS = (1 << 2),
};
typedef int (*pakfire_build_log_callback)
goto ERROR;
}
- int build_flags =
- PAKFIRE_BUILD_DISABLE_SNAPSHOT |
- (job->flags & PAKFIRE_JOB_CCACHE) ? 0 : PAKFIRE_BUILD_DISABLE_CCACHE;
+ int build_flags = 0;
+
+ // Disable the ccache
+ if (!(job->flags & PAKFIRE_JOB_CCACHE))
+ build_flags |= PAKFIRE_BUILD_DISABLE_CCACHE;
// Create a new build environment
r = pakfire_build_create(&build, pakfire, job_id, build_flags);