From: Michael Tremer Date: Fri, 18 Oct 2024 15:18:10 +0000 (+0000) Subject: snapshot: Remove the option to define packages X-Git-Tag: 0.9.30~1009 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46d91965d6f9660dd46fedeb457aab63808d18b3;p=pakfire.git snapshot: Remove the option to define packages Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/include/pakfire/snapshot.h b/src/libpakfire/include/pakfire/snapshot.h index e7fa1018b..280322687 100644 --- a/src/libpakfire/include/pakfire/snapshot.h +++ b/src/libpakfire/include/pakfire/snapshot.h @@ -42,8 +42,7 @@ const char* pakfire_snapshot_path(struct pakfire_snapshot* snapshot); int pakfire_snapshot_mount(struct pakfire_snapshot* snapshot, const char* path); int pakfire_snapshot_umount(struct pakfire_snapshot* snapshot); -int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, - struct pakfire* pakfire, const char** packages); +int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, struct pakfire* pakfire); int pakfire_snapshot_clean(struct pakfire* pakfire); diff --git a/src/libpakfire/pakfire.c b/src/libpakfire/pakfire.c index af918b7ed..4ca2e01c1 100644 --- a/src/libpakfire/pakfire.c +++ b/src/libpakfire/pakfire.c @@ -1722,13 +1722,8 @@ int pakfire_update_snapshot(struct pakfire* pakfire) { struct pakfire_snapshot* snapshot = NULL; int r; - const char* packages[] = { - "build-essential", - NULL, - }; - // Make a new snapshot - r = pakfire_snapshot_make(&snapshot, pakfire, packages); + r = pakfire_snapshot_make(&snapshot, pakfire); if (r < 0) goto ERROR; diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index beb5c6944..0aef6cfc3 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -448,8 +448,7 @@ ERROR: /* Creates a new snapshot */ -int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, - struct pakfire* pakfire, const char** packages) { +int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, struct pakfire* pakfire) { struct pakfire* p = NULL; char snapshot_path[PATH_MAX]; char tmp[PATH_MAX]; @@ -457,6 +456,11 @@ int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, char time[1024]; int r; + const char* packages[] = { + "build-essential", + NULL, + }; + struct pakfire_ctx* ctx = pakfire_ctx(pakfire); // Store the current time