Skip to content

common-utils: -q list jq is an invalid command query for microdnf #1449

@Elliot-Ford

Description

@Elliot-Ford

The install command microdnf does not use -q list to query installed packages. The command used is repoquery. This is a problem in the common-utils/main.sh:install_redhat_packages() function as all the conditionals checking if a package is not installed will evaluate to true and attempt to install the package.

An example from the function:

       # Install EPEL repository if needed (required to install 'jq' for CentOS)
        if ! ${install_cmd} -q list jq >/dev/null 2>&1; then
            ${install_cmd} -y install epel-release
            remove_epel="true"
        fi

This particular example causes a problem for me as my base container doesn't have the epel-release package defined, but does have jq installed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions