RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1696409 - [RFE] the man page for rpm needs to document that it will create an empty database when nothing is present
Summary: [RFE] the man page for rpm needs to document that it will create an empty dat...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rpm
Version: 8.1
Hardware: All
OS: All
low
medium
Target Milestone: rc
: 8.0
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 19:27 UTC by jcastran
Modified: 2019-06-04 13:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 13:38:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jcastran 2019-04-04 19:27:04 UTC
Description of problem:
A bug indicating that the man page for rpm needs to document that it will create an empty database in the event that it is not present. 


Version-Release number of selected component (if applicable):
rpm-4.14.2-9.el8.x86_64


How reproducible:
Everytime

Steps to Reproduce:
1. # ls /dir/
     <empty>
2. # rpm -qa --root=/dir/

Actual results:
An empty database is generated at the specified location

# ls /dir/var/lib/rpm/
Basenames     Dirnames     Filetriggername  Installtid  Obsoletename  Providename    Requirename  Sigmd5       Supplementname        Triggername
Conflictname  Enhancename  Group            Name        Packages      Recommendname  Sha1header   Suggestname  Transfiletriggername


Expected results:
This is expected BUT the rpm man page should clarify that.

I.E. Something along the lines of the "Note:" section in the example below:

    DESCRIPTION
       rpm is a powerful Package Manager, which can  be  used  to  build,
       install,  query,  verify,  update,  and  erase individual software
       packages.  A package consists of an archive of files and meta-data
       used  to  install  and  erase  the  archive  files.  The meta-data
       includes helper scripts, file attributes, and descriptive informa‐
       tion  about  the  package.  Packages come in two varieties: binary
       packages, used to encapsulate software to be installed, and source
       packages,  containing the source code and recipe necessary to pro‐
       duce binary packages.

       Note: The underlying database is assumed to  be  present.  In  the
       event  that  it is blank, or an option is selected that results in
       the database path being  non-default  and  there  is  no  database
       present,  an  empty  database is created at that time. This effec‐
       tively replicates the --initdb behaviour for all commands.

       One of the following basic modes must be selected: Query,  Verify,
       Install/Upgrade/Freshen/Reinstall,  Uninstall,  Set Owners/Groups,
       Show Querytags, and Show Configuration.

Additional info:
  --root=/dir will create /dir/var/lib/rpm/<database files>
  --dbpath=/dir will create /dir/<database files>

Comment 1 Florian Festi 2019-06-04 13:38:49 UTC
Sorry, not all details of rpm's behaviour are or even can be described in the man page. The man page is too long already. This is much too obscure it use up this sort of real estate.


Note You need to log in before you can comment on or make changes to this bug.