Bug 202061

Summary: Request for more user-friendly RPM documentation
Product: [Fedora] Fedora Reporter: Craig Pemberton <craigpemberton>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: herrold, redhat-bugzilla, sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://forums.fedoraforum.org/showthread.php?t=120248
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-01 11:18:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 249352    
Bug Blocks:    

Description Craig Pemberton 2006-08-10 16:21:11 UTC
Description of problem:

Many new users to Linux encounter rpm very early on because of it's centrality
to the management of many distributions. Encountering the the message that rpm
issues from simply typing rpm makes the (real or apparent) learning curve for
Linux shoot way up. This is the same message received by invoking rpm
incorretly. Info rpm brings up something about yes or no questions. man rpm
brings up a preponderence of good information but which could be overwhelming. A
lot of the confusion seen on fedoraforum is related to yum and rpm issues so I
was hoping the usage documentation could be clarified (and possibly simplified?)

I know a lot of people just want a synopsis. Also, people working with bulding
rpms use a lot more of the features than people just installing them, so there
is some conflict of interest as to the focus of the rpm documentation. The way I
see it is that if you are building rpms then you can hopefully fend for yourself
and find more obscure documentation more easily and so the documentation
focusing of the basic user should be more visible than that for the rpm builder.


Actual results:

Currently rpm issues the following, which seems a little jumbled and difficult.

Usage: rpm [-aKfgpWHqV] [-aKfgpWHqVcdils] [-aKfgpWHqVcdilsaKfgpWHqV]
[-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV]
[-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVK]
[-aKfgpWHqVcdilsaKfgpWHqVKi] [-aKfgpWHqVcdilsaKfgpWHqVKiv]
[-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv?] [-a|--all]
[-f|--file] [-g|--group]
        [-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid]
        [--specfile] [--triggeredby] [--whatrequires] [--whatprovides]
        [--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list]
        [--queryformat=QUERYFORMAT] [-s|--state] [--nomd5] [--nofiles]
        [--nodeps] [--noscript] [--comfollow] [--logical] [--nochdir]
        [--nostat] [--physical] [--seedot] [--xdev] [--whiteout]
        [--addsign] [-K|--checksig] [--delsign] [--import] [--resign]
        [--nodigest] [--nosignature] [--initdb] [--rebuilddb] [--aid]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
        [--excludedocs] [--excludepath=<path>] [--fileconflicts] [--force]
        [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
        [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nomd5]
        [--nocontexts] [--noorder] [--nosuggest] [--noscripts]
        [--notriggers] [--oldpackage] [--percent] [--prefix=<dir>]
        [--relocate=<old>=<new>] [--repackage] [--replacefiles]
        [--replacepkgs] [--test] [-U|--upgrade <packagefile>+]
        [-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR'] [--macros=<FILE:...>]
        [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT]
        [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
        [-?|--help] [--usage] [--scripts] [--setperms] [--setugids]
        [--conflicts] [--obsoletes] [--provides] [--requires] [--info]
        [--changelog] [--xml] [--triggers] [--last] [--filesbypkg]
        [--fileclass] [--filecolor] [--filecontext] [--fscontext]
        [--recontext] [--fileprovide] [--filerequire] [--redhatprovides]
        [--redhatrequires] [--buildpolicy=<policy>] [--with=<option>]
        [--without=<option>]


xpected results:

I was thinking of something like the following, which would quickly show user
the common idomatic uses of rpm (although what I wrote up may be too
beginner-end-user centric.)

The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. 

Query mode options (after -q)
  -i print package information
  -c            		   list all configuration files
  -d		                   list all documentation files
  -l                               list files in package
  -a                               list all packages
  -f                               list package(s) owning file
  --whatrequires                   list the package(s) which require a dependency
  --whatprovides                   list the package(s) which provide a dependency

Install/Upgrade/Erase mode options (after -i or -U or -e)
  -h                               print hash marks as package installs (good
with -v)

Verify options (after -V):
  --nofiles                        don't verify files in package
  -a                               query/verify all packages
  -f                               query/verify package(s) owning file

Common options for all rpm modes:
  --quiet                          provide less detailed output
  --verbose, -v                    provide more detailed output
  --version                        print the version of rpm being used

Help options:
  --help, -?                       Show a more complete help message
  --usage                          Display a concise usage message

Examples:
rpm -q sendmail			#see if sendmail is installed, and print version info
rpm -qic bash			#give info for  and list all configuration files
rpm -qa | grep font		#locate all installed packages with font in the name
rpm -q --whatprovides httpd	#see what package is providing the html server
rpm -qf file			#see what package a file belongs to
rpm -e rhythmbox		#uninstall rhythmbox
rpm -i file.rpm			#install file.rpm regardless of other installed versions (-U
is prefered)
rpm -Uvh file.rpm		#install file.rpm, replacing older versions, displaying
hashes and verbosity
rpm -Va --nofiles		#check your system for missing dependencies


Additional info:

Thank you very much for you time!

Comment 1 Jeff Johnson 2006-08-19 11:58:09 UTC
Heh, with two books, and 10 years of deployment, there's very little that can be done through
documentation to simplify rpm usage imho.

Examples would probably help, but that only works for the rpm CLI, and does not help
clarifying how to resolve dependencies by installing other packages.

Comment 2 Jeff Johnson 2007-04-19 03:15:27 UTC
FWIW, thr popt problem that displayed options multiple times has been fixed for at leats 6-8 months

Comment 3 Robert Scheck 2007-08-10 12:06:33 UTC
Panu, this bug report is rpm and NOT popt, e.g. modify /usr/lib/rpm/rpmpopt or 
hack this in rpm itself, please.


Comment 4 Panu Matilainen 2007-08-10 12:09:09 UTC
Note comment #2 - much of the ugliness is fixed in later popt. 

Comment 5 Robert Scheck 2007-08-10 12:11:04 UTC
Okay, but Fedora Core 5 is EOL anyway. Finally this bug report should be closed 
as currentrelease or modified in rpm for nextrelease.

Comment 6 Panu Matilainen 2007-08-10 12:34:08 UTC
Nod, sorry I missed that one (been through too many bugs today). Not going to
gett resolved in anything older than F8 really so moving to devel. Oh and the
popt duplicate messages part is just one piece of the picture, not equal to
fixing the rpm documentation :)

Comment 7 Robert Scheck 2007-08-23 23:29:59 UTC
The popt part of this problem is solved in popt 1.12-3 which should reach 
Rawhide soon. Panu, keep this bug report open, if you would like to change 
something in rpm, otherwise please close this report.

Comment 8 Panu Matilainen 2008-04-01 11:18:48 UTC
Ok, the popt issue is fixed long ago... 

I'm sticking a link to the on-line version of RPM Guide to the rpm package
description, rpm documentation isn't going to get much more friendlier than that.