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

Panu Matilainen notifications at github.com
Mon Nov 18 08:39:02 UTC 2024


@pmatilai commented on this pull request.



> @@ -683,3 +683,20 @@ runroot rpm -q 'versiontest-1.0~2-1'
 [])
 
 RPMTEST_CLEANUP
+
+# ------------------------------
+AT_SETUP([rpmdb vacuum])
+AT_KEYWORDS([install rpmdb sqlite])
+cp -r /usr/lib/sysimage/rpm "${RPMTEST}"/tmp
+RPMTEST_CHECK([
+runroot rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -U /data/RPMS/foo-1.0-1.noarch.rpm 2>&1 | grep VACUUM
+runroot rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -e foo-1.0-1 2>&1 | grep VACUUM
+],
+[0],
+[D: VACUUM: 0
+D: Rpmdb Sqlite backend VACUUM maxfree: 1024, free: 397312 -> 0

/usr/lib/sysimage/rpm is a "live" rpmdb, so these values can and will change, breaking the test.

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

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


More information about the Rpm-maint mailing list