Bug 180996 - "already added" reported as warning but treated as an error
"already added" reported as warning but treated as an error
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
7
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-10 23:17 EST by D. Hugh Redelmeier
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.4.2.2-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-24 03:14:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description D. Hugh Redelmeier 2006-02-10 23:17:34 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
rpm notices when I try to update (-U) with the same version of a package twice (good).  It reports this as a "warning" (seems reasonable).  Then it stops, saying that there was an error.  Either it is a warning or an error, not both.

Version-Release number of selected component (if applicable):
rpm-4.4.1-22

How reproducible:
Always

Steps to Reproduce:
1. rpm -Uv core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm
2. # notice thd duplicated package name  

Actual Results:  # rpm -Uv core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm 
warning: package kernel = 2.6.15-1.1831_FC4 was already added, skipping kernel < 2.6.15-1.1831_FC4
error: error reading from file core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm
# 


Expected Results:  just the warning.  Or perhaps an error.  Not both.

Additional info:
Comment 1 Jeff Johnson 2006-02-11 08:54:31 EST
The warning and the error have different causes.

The warning is for a replacement of one package with another, names must be unique in a transaction.

The error is from (probably) a package with an intact header but a truncated payload.
Comment 2 D. Hugh Redelmeier 2006-02-11 10:59:40 EST
n3npq said: "The error is from (probably) a package with an intact header but a
truncated payload."

That turns out not to be the case.
  $ rpm --checksig core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm
  core4up/x86_64/kernel-2.6.15-1.1831_FC4.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK

If the two diagnostics are reporting different errors (that makes sense), then
the second report needs to be more clear.  A user confronted with that message
has no hint as to what the problem is.  Even n3npq interpreted it incorrectly.
Comment 3 Jeff Johnson 2006-02-11 15:44:15 EST
I guessed and ma known to make mistakes.

What version of rpm?
Comment 4 D. Hugh Redelmeier 2006-02-11 15:51:51 EST
Version-Release number of selected component (if applicable):
rpm-4.4.1-22

Comment 5 Jeff Johnson 2006-02-11 15:55:21 EST
RH's problem, not mine, then.
Comment 6 Paul Nasrat 2006-02-13 10:50:23 EST
kernels should be installed not upgraded - use -ivh.
Comment 7 D. Hugh Redelmeier 2006-02-13 11:20:51 EST
Yes, kernels should be installed.  But this problem has nothing to do with the
fact that the particular rpm was a kernel.

Here is another example, using a non-kernel rpm.  The first commandss are just
to put the last command in context.  Notice that the diagnostic from the first
"rpm -Uv" does not appear in the second's output.  [I've added a blank line
before each shell prompt to ease reading.]

# rpm -q xpdf
xpdf-3.01-0.FC4.8

# rpm -Uv core4up/x86_64/xpdf-3.01-0.FC4.8.x86_64.rpm
Preparing packages for installation...
        package xpdf-3.01-0.FC4.8 is already installed

# rpm -Uv core4up/x86_64/xpdf-3.01-0.FC4.8.x86_64.rpm \
> core4up/x86_64/xpdf-3.01-0.FC4.8.x86_64.rpm
warning: package xpdf = 1:3.01-0.FC4.8 was already added, skipping xpdf <
1:3.01-0.FC4.8
error: error reading from file core4up/x86_64/xpdf-3.01-0.FC4.8.x86_64.rpm

# 
Comment 8 Paul Nasrat 2006-02-13 18:48:05 EST
rpm --qf '%{name}-%{version}-%{release}.%{arch}\n' -q xpdf
Comment 9 D. Hugh Redelmeier 2006-02-13 22:29:12 EST
On same system, in same state:
$ rpm --qf '%{name}-%{version}-%{release}.%{arch}\n' -q xpdf
xpdf-3.01-0.FC4.8.x86_64
Comment 10 Jeff Johnson 2007-01-13 11:24:03 EST
Fixed (by treating consistently as a warning) in rpm cvs, should be in rpm-4.4.8-0.10 when built.

Note that the behavior depends on the value of %_transaction_color.

Here's what is implemented in rpm-4.4.8-0.10:

# rpm -E '%{_transaction_color}'
3
# rpm -Uvh time-*
error: Failed dependencies:
        libc.so.6()(64bit) is needed by time-1.7-27.x86_64
        libc.so.6(GLIBC_2.2.5)(64bit) is needed by time-1.7-27.x86_64
        libc.so.6(GLIBC_2.3.4)(64bit) is needed by time-1.7-27.x86_64
# vi /usr/lib/rpm/macros
# rpm -E '%{_transaction_color}'
0
# rpm -Uvh time-*
warning: package file time-1.7-27.x86_64.rpm was skipped
Preparing...                ########################################### [100%]
   1:time                     ########################################### [100%]

UPSTREAM
Comment 11 Christian Iseli 2007-01-22 06:44:15 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.
Comment 12 D. Hugh Redelmeier 2007-07-05 10:51:01 EDT
This problem is still in F7 (rpm-4.4.2-46.fc7).
Comment 13 Panu Matilainen 2007-09-11 03:30:40 EDT
Fixed upstream and rawhide, F7 should get 4.4.2.2 once final is out
Comment 14 Fedora Update System 2007-10-12 16:02:32 EDT
rpm-4.4.2.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpm'
Comment 15 Fedora Update System 2007-10-24 03:13:52 EDT
rpm-4.4.2.2-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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