Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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: NEW
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-04-16 07:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


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>


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