Unexpected change in RPM behavior

Solution Verified - Updated -

Issue

  • We've noted a change in the behavior of the RPM program.
  • In RHEL 5 and earlier if rpm --import <gpg-key> is called and the key has already been imported rpm creates duplicate and returns zero exit code.
  • In RHEL 6 if --import <gpg-key> is called and the key has already been imported rpm doesn't create duplicate but exits with an error "error: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release: key 1 import failed." and a non-zero exit code.
$ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

error: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release: key 1 import failed.
error: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release: key 2 import failed

Environment

  • Red Hat Enterprise Linux 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content