[Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

Panu Matilainen notifications at github.com
Mon Nov 18 10:26:50 UTC 2024


@pmatilai commented on this pull request.



>  		sqlexec(sdb, "PRAGMA optimize");
 		sqlexec(sdb, "PRAGMA wal_checkpoint = TRUNCATE");
+
+		int max_size = rpmExpandNumeric("%{?_sqlite_vacuum}");
+		if (max_size <= 0)
+		    max_size = 20*1024*1024;
+		long free_space = sqlite_free_space(sdb);

On 32bit architectures, long is a mere 32bit integer. Better be safe and use explicit int64_t for the size since that's you're getting it from sqlite to begin with.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3452#pullrequestreview-2442197923
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3452/review/2442197923 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241118/05caf3d2/attachment.htm>


More information about the Rpm-maint mailing list