Skip to content

ensure history db directory exists#573

Merged
oliverkurth merged 6 commits intodevfrom
topic/okurth/ensure-history-db-dir
Apr 29, 2026
Merged

ensure history db directory exists#573
oliverkurth merged 6 commits intodevfrom
topic/okurth/ensure-history-db-dir

Conversation

@oliverkurth
Copy link
Copy Markdown
Contributor

@oliverkurth oliverkurth commented Apr 17, 2026

  • ensure that the history db directory exists, to avoid failures
  • Check for history db errors: the db may have been busy, and the error SQLITE_BUSY wasn't checked.
    This lead to invalid entries written to the db, and this caused errors leter when read back.
    This change also skips over these invalid entries, and adds a busy timeout (500 seconds),
    to wait when busy instead of exting with SQLITE_BUSY immediately.
  • fix a few test issues
  • Fedora gcc showed a few warnings, also fixed.

RPM 6 introduces an unshare plugin which isolates scriptlet execution.
In unprivileged docker containers this fails with "Operation not permitted",
causing tests that install packages with scriptlets (like test_erase_verbose)
to fail. Disable the unshare plugin for pytest.

Made-with: Cursor
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
In RPM 6, importing a key that already exists can upgrade its entry in the
RPM database from a short ID format to a full fingerprint format
(e.g., gpg-pubkey-8a6a826d... becomes gpg-pubkey-0fbe7030...8a6a826d...).
When tests imported the VMware key, the setup/teardown logic mistakenly
identified the upgraded key format as a entirely new key and deleted it,
which then caused the test module's package consistency check to fail since
the original key was removed.

Update the test logic to identify keys by their short ID suffixes to correctly
handle these format upgrades, and ignore gpg-pubkey changes in the global
test consistency check.

Made-with: Cursor
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch from fd89e63 to 205bd03 Compare April 17, 2026 21:03
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch from 205bd03 to 15cc4b1 Compare April 17, 2026 21:49
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch 3 times, most recently from 1d25262 to 234e0b8 Compare April 24, 2026 23:15
Comment thread ci/prep.sh Outdated
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch from 234e0b8 to bf31bc3 Compare April 29, 2026 19:54
… SQLITE_BUSY wasn't checked.

This lead to invalid entries written to the db, and this caused errors leter when read back.
This change also skips over these invalid entries, and adds a busy timeout (500 seconds),
to wait when busy instead of exting with SQLITE_BUSY immediately.

Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch from bf31bc3 to c139cf2 Compare April 29, 2026 20:41
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
@oliverkurth oliverkurth force-pushed the topic/okurth/ensure-history-db-dir branch from c139cf2 to dc0d1c3 Compare April 29, 2026 20:55
@oliverkurth oliverkurth merged commit cc1a46a into dev Apr 29, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants