XK0-004 · Question #514
A junior administrator needs to display information for an RPM package that contains software from an external provider. Which of the following commands will display the package information?
The correct answer is B. rpm -qp package.noarch.rpm. To query metadata from an RPM package file that has not yet been installed, the -qp flag combination is required to target the local package file directly.
Question
A junior administrator needs to display information for an RPM package that contains software from an external provider. Which of the following commands will display the package information?
Options
- Arpm -vp package.noarch.rpm
- Brpm -qp package.noarch.rpm
- Crpm -qf package.noarch.rpm
- Drpm -qi package.noarch.rpm
How the community answered
(33 responses)- A3% (1)
- B91% (30)
- C6% (2)
Why each option
To query metadata from an RPM package file that has not yet been installed, the -qp flag combination is required to target the local package file directly.
The -v flag enables verbose output for operations like install or verify; combined with -p it does not produce a standard package information summary the way -qp does.
The rpm -qp option queries a local package file (the -p flag means 'package file') rather than the installed package database. Running rpm -qp package.noarch.rpm displays the package name, version, architecture, and description from the package header without requiring it to be installed first, which is exactly what is needed for an externally provided RPM.
rpm -qf (file query) is used to determine which already-installed package owns a specific file on the filesystem, not to inspect an uninstalled .rpm file.
rpm -qi queries information about a package that is already installed in the RPM database; it will fail or return no results for a package file that has not been installed yet.
Concept tested: RPM package file query before installation
Source: https://rpm.org/documentation.html
Topics
Community Discussion
No community discussion yet for this question.