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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.