3

I came across someone's RPM command that wrote:

rpm -ivH ....

and then noticed that option -H is not documented anywhere.

Command rpm -H no longer works with newer version of rpm, however it runs successfully under rpm version 4.8, produces no output and then exits.

So what is the command rpm -H used to do?

System is a Scientific Linux 6.1:

$ rpm --version
RPM version 4.8.0
$ rpm -H
$ echo $?
0
6
  • Are you sure it's capital 'H'?
    – UVV
    Jan 13, 2014 at 13:52
  • @UVV Affirmative.
    – Howard
    Jan 13, 2014 at 14:04
  • Probably a typo, should have been h.
    – Mat
    Jan 13, 2014 at 14:16
  • @Mat - doesn't appear to be a typo, see my A, it's a real switch that was confirmed to exist in 4.8 at least.
    – slm
    Jan 13, 2014 at 14:49
  • 1
    @Mat - good point, I never saw it used in that context, so you're probably right 8-). He shows that sample but then asks about -H by itself.
    – slm
    Jan 13, 2014 at 14:57

1 Answer 1

3

1. Are we sure it isn't a typo?

Are you sure that worked under 4.8? I just tried it in 4.3.2.

$ rpm --version
RPM version 4.3.2

$ rpm -H
-H: unknown option

2. Switch is confirmed!

This seems to be limited to just version 4.8 only.

$ rpm -H
$ 

$ cat /etc/redhat-release 
CentOS release 6.5 (Final)

3. Evidence of its existence

I did find this thread on rpm5.org, titled: Re: parsing hdlists with rpmgi? which shows the -H switch in action.

$ rpm -qH
    error: rpmpkgRead: Header: Header V3 DSA signature: UNKNOWN, key ID 26752624
    [jbj@localhost tmp]$ sudo rpm --import 0x26752624
    [jbj@localhost tmp]$ rpm -qH
    error: rpmpkgRead: Header: Header V3 DSA signature: UNKNOWN, key ID 26752624

and here:

$ rpm -qH -vv --nosignature
D: pool fd: created size 384 limit -1 flags 0
D: pool lua:    created size 56 limit -1 flags 0
D: pool ts: created size 1192 limit -1 flags 0
D: pool gi: created size 160 limit -1 flags 0
D: pool dig:    created size 400 limit -1 flags 0
D: pool ctx:    created size 104 limit -1 flags 0
D: pool h:  created size 352 limit -1 flags 0
lib64rpm1-4.8.1-1mnb2.x86_64
x11-driver-video-ati-6.13.99-0.20101119.1mdv2011.0.x86_64

4. Smoking gun...Git commit logs!

This would appear to be the smoking gun. This shows a discussion in removing this feature. It's the git commit log.

From: Panu Matilainen <[email protected]>
Date: Fri, 19 Mar 2010 14:54:00 +0000 (+0200)
Subject: Eliminate hysterical --hdlist query option and everything implementing it
X-Git-Tag: rpm-4.9.0-beta1~839
X-Git-Url: http://rpm.org/gitweb?p=rpm.git;a=commitdiff_plain;h=367c0d7014b769a5c12f83b525dddb0a7c76beef

...
Eliminate hysterical --hdlist query option and everything implementing it
- This hidden gem used "system hdlist", ie "/usr/share/comps/%{_arch}/hdlist
  as the source for queries. Such "system hdlist" hasn't existed anywhere
  since RHL 9/FC 1 times...

In that same thread is this code snippet which shows the switch being removed.

- { "hdlist", 'H', POPT_ARGFLAG_DOC_HIDDEN, 0, POPT_HDLIST,
-   N_("query/verify package(s) from system HDLIST"), "HDLIST" },
-

So the switch is synonymous with --hdlist.

References

2
  • I mean rpm 4.8 specifically
    – Howard
    Jan 13, 2014 at 14:05
  • 1
    @HowardGuo - thanks for the Q. I learned something new from it as well. 8-)
    – slm
    Jan 13, 2014 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .