Bug 180996 - "already added" reported as warning but treated as an error
Summary: "already added" reported as warning but treated as an error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-11 04:17 UTC by D. Hugh Redelmeier
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.4.2.2-2.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-24 07:14:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description D. Hugh Redelmeier 2006-02-11 04:17:34 UTC
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 13:54:31 UTC
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 15:59:40 UTC
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 20:44:15 UTC
I guessed and ma known to make mistakes.

What version of rpm?

Comment 4 D. Hugh Redelmeier 2006-02-11 20:51:51 UTC
Version-Release number of selected component (if applicable):
rpm-4.4.1-22



Comment 5 Jeff Johnson 2006-02-11 20:55:21 UTC
RH's problem, not mine, then.

Comment 6 Paul Nasrat 2006-02-13 15:50:23 UTC
kernels should be installed not upgraded - use -ivh.

Comment 7 D. Hugh Redelmeier 2006-02-13 16:20:51 UTC
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 23:48:05 UTC
rpm --qf '%{name}-%{version}-%{release}.%{arch}\n' -q xpdf

Comment 9 D. Hugh Redelmeier 2006-02-14 03:29:12 UTC
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 16:24:03 UTC
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 11:44:15 UTC
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 14:51:01 UTC
This problem is still in F7 (rpm-4.4.2-46.fc7).

Comment 13 Panu Matilainen 2007-09-11 07:30:40 UTC
Fixed upstream and rawhide, F7 should get 4.4.2.2 once final is out

Comment 14 Fedora Update System 2007-10-12 20:02:32 UTC
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 07:13:52 UTC
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.