Bug 47158 - --replacepkgs not always working
Summary: --replacepkgs not always working
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-03 17:12 UTC by Ronny Buchmann
Modified: 2007-03-27 03:46 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-07-03 17:12:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Ronny Buchmann 2001-07-03 17:12:41 UTC
Description of Problem:
--replacpkgs doesn't work without --replacefiles when updating rebuild
packages with same version and release but different file times


How Reproducible:
always

Steps to Reproduce:
1. install package xyz
2. rebuild the binary rpm
3. rpm -U --replacepkgs newbinary.rpm
says "file /some/file from install of xyz conflicts with file from package
xyz" for every file

-> it only works with --replacefiles also given
but this could overwrite files from other packages

Comment 1 Jeff Johnson 2001-07-08 19:31:06 UTC
This is the traditional, orthogonal, behavior of the --replackepkgs
and --replacefiles options. Attempting to find interrelationships between
all the options, so that, say, --replacepkgs can always assume --replacefiles
is risky, because  it changes the expected behavior of rpm.  I don't believe
there's sufficient gain to justify changing the existing behavior.

You can, if you wish, create your own rpm options using popt aliases. For
example, you can do
  echo "rpm alias --replaceboth --replacepkgs --replacefiles" >> /etc/popt
and then invoke rpm with
  rpm -U --replaceboth <package>


Comment 2 Ronny Buchmann 2001-07-08 20:24:42 UTC
-U --replacepkgs _should_always_ work without --replacefiles, because what -U
does, is not more than -e and -i one after the ofter (at least it looks like this)

the problem is that rpm isn't consequent,
if the package which is to be updated differs from the installed one (in
version/release) everything is ok
but if they differ only in the files it is not working

from the man page
       --replacefiles
              Install the packages even  if  they  replace  files
              from other, already installed, packages.
                   ^^^^^

       --replacepkgs
              Install  the  packages  even  if  some  of them are
              already installed on this system.
              ^^^^^^^ ^^^^^^^^^

the description is correct, but rpm shows a different behaviour


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