Bug 104547 - no configuration files when upgrading
no configuration files when upgrading
Status: CLOSED NOTABUG
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-16 19:46 EDT by Gustavo Niemeyer
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-09-21 09:53:16 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)
dummy1-1.0-1cl.noarch.rpm (1.65 KB, application/octet-stream)
2003-09-16 19:48 EDT, Gustavo Niemeyer
no flags Details
dummy1-2.0-1cl.noarch.rpm (1.24 KB, application/octet-stream)
2003-09-16 19:50 EDT, Gustavo Niemeyer
no flags Details
dummy2-2.0-1cl.noarch.rpm (1.65 KB, application/octet-stream)
2003-09-16 19:50 EDT, Gustavo Niemeyer
no flags Details

  None (edit)
Description Gustavo Niemeyer 2003-09-16 19:46:32 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.4) Gecko/20030901

Description of problem:
When a configuration file is moved between packages, rpm leaves the system in an
unpredictable state, since the first package will remove the file, but the
second might not install it. Here is how to reproduce it:

1) dummy1-1.0 has /tmp/foo
2) /tmp/foo is moved from dummy1-2.0 to dummy2-2.0
3) /tmp/foo is marked %config(noreplace) in dummy2-2.0
   (it might be marked in dummy1 or not).
4) dummy1-1.0 is installed in the system
5) in a single transaction dummy1-1.0 is upgraded to 2.0,
   and dummy2-2.0 is installed.

After that, the system will be in an unpredictable state, depending on the
installation order, if /tmp/foo has been changed, and how it if it was a %config
in dummy1-1.0.

For example, if the file has changed, it was not a %config in dummy1-1.0, and
dummy-2.0 is installed *after* dummy-1.0,
a /tmp/foo.rpmnew will be saved, but there will be no /tmp/foo.
(that's the example packages being provided). OTOH, if /tmp/foo has *not*
changed, there will be no /tmp/foo* at all.


Version-Release number of selected component (if applicable):
rpm 4.0.4, at least

How reproducible:
Always

Steps to Reproduce:
In the description.

Additional info:
Comment 1 Gustavo Niemeyer 2003-09-16 19:48:07 EDT
Created attachment 94536 [details]
dummy1-1.0-1cl.noarch.rpm
Comment 2 Gustavo Niemeyer 2003-09-16 19:50:03 EDT
Created attachment 94537 [details]
dummy1-2.0-1cl.noarch.rpm
Comment 3 Gustavo Niemeyer 2003-09-16 19:50:54 EDT
Created attachment 94538 [details]
dummy2-2.0-1cl.noarch.rpm
Comment 4 Gustavo Niemeyer 2003-09-16 19:52:41 EDT
To reproduce it with the attached packages, just do:

   rpm -Uvh *1.0*; rpm -Uvh *2.0*

It should say something like:

   warning: /tmp/foo created as /tmp/foo.rpmnew

But there will be no /tmp/foo.
Comment 5 Jeff Johnson 2003-09-21 09:53:16 EDT
I've tried the 4 possible upgrades, /tmp/foo modified or not and dummy1/dummy2
order on CLI, and can't reproduce a problem with rpm-4.2.1.

Might very well be a bug in rpm-4.0.x

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