Skip to content

Fix for UBI10 RPMDB location#2183

Merged
MartinBasti merged 1 commit intocontainerbuildsystem:masterfrom
obriencj:ubi10-rpmdb
Apr 23, 2026
Merged

Fix for UBI10 RPMDB location#2183
MartinBasti merged 1 commit intocontainerbuildsystem:masterfrom
obriencj:ubi10-rpmdb

Conversation

@obriencj
Copy link
Copy Markdown
Contributor

Updates the rpmqa plugin such that it searches both the original /var/lib/rpm location, and if that fails attempts a fallback list of dirs, currently just /usr/lib/sysimage/rpm

If nothing is found, it still raises a NothingExtractedError as before, unless it is a base_from_scratch image in which case it preserves original behavior and returns an empty list

Maintainers will complete the following section

  • Commit messages are descriptive enough
  • Code coverage from testing does not decrease and new code is covered
  • Python type annotations added to new code
  • JSON/YAML configuration changes are updated in the relevant schema
  • Changes to metadata also update the documentation for the metadata
  • Pull request has a link to an osbs-docs PR for user documentation updates
  • New feature can be disabled from a configuration file

Comment thread atomic_reactor/plugins/rpmqa.py Outdated
else:
self.log.info("image doesn't contain or has empty rpmdb %s", rpmdb_origin)
else:
self.log.info("found rpmdb %s" % rpmdb_origin)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.log.info("found rpmdb %s" % rpmdb_origin)
self.log.info("found rpmdb %s", rpmdb_origin)

@MartinBasti
Copy link
Copy Markdown
Contributor

also Flake8 should be improved, ignore mypy and tekton linters

Comment thread atomic_reactor/plugins/rpmqa.py Outdated
except NothingExtractedError:
if self.workflow.data.dockerfile_images.base_from_scratch:
self.log.info("scratch image doesn't contain or has empty rpmdb %s", rpmdb_origin)
self.log.info(f"scratch image doesn't contain rpmdb at {rpmdb_origin}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f-strings shouldn't be used in logger. To prevent unneeded string interpolation, use log.info("text %s", var, ...)

@MartinBasti
Copy link
Copy Markdown
Contributor

Please squash those fixup commits into one commit

Updates the rpmqa plugin such that it searches both the original
/var/lib/rpm location, and if that fails attempts a fallback list
of dirs, currently just /usr/lib/sysimage/rpm

If nothing is found, it still raises a NothingExtractedError as
before, unless it is a base_from_scratch image in which case it
preserves original behavior and returns an empty list

Mimics expected specific error and log messages

Signed-off-by: Christopher O'Brien <cobrien@redhat.com>
@MartinBasti MartinBasti merged commit f6b1ea4 into containerbuildsystem:master Apr 23, 2026
13 of 15 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.

3 participants