[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: -Uvh with multiple pkgs with same name...



On Fri, Jan 24, 2003 at 10:05:29AM -0500, James Olin Oden wrote:
> I just found a fairly odd behavior of RPM, and I was wondering if it
> might be a bug (or I just don't understand things properly and its
> a feature).  If you run rpm in upgrade mode via -U, and supply it
> multiple packages with the same name but differring  versions, it will
> basically install all of them as if you had supplied the -i switch instead.
> For instance:
> 
> 	rpm -Uvh x-1-1.noarch.rpm x-1-2.norarch.rpm
> 
> Will actually install both RPM's.   "rpm -qi x" will
> now list version 1-1 and version 1-2 of this rpm.
> 
> I would have expected one two following behaviors instead:
> 
> 	- RPM just errors out, complaining about not being able to upgrade
> 	  two rpm with the same name.
> 	- It upgrades the older one, and then it upgrades the newer one.  The
> 	  end result is just one instance of the package shows up in the
> 	  database.  In other words:
> 	
> 		rpm -Uvh x-1-1.noarch.rpm x-1-2.norarch.rpm
> 
> 	  should be semanticly the same as:
> 
> 		rpm -Uvh x-1-1.noarch.rpm
> 		rpm -Uvh x-1-2.noarch.rpm
> 
> I actually prefer the later approach, but would understand the former 
> approach.

There are certainly many other expectations possible too. Without
some consensus on what *should* happen, all that remains is a
desert of unfufilled expectations cross dressing as "bugs".

> 
> So is this a bug, or am I missing something?

No, it's not a bug, it's called "cockpit error" :-)

Note carefully: The above problem(s) are about to get far more complicated,
as rpm-4.2 attempts to install identically named (yes, EVR too, but arch
differs) packages, one of which contains Elf32, the other Elf64, executables
and libraries.

Consider what happens with --upgrade and --erase.

For extra credit, ponder --rollbacks or %trigger*.

Multiple identically named (with different EVR) packages is *easy*.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []