Bug 104547 - no configuration files when upgrading
Summary: no configuration files when upgrading
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-16 23:46 UTC by Gustavo Niemeyer
Modified: 2007-04-18 16:57 UTC (History)
0 users

Clone Of:
Last Closed: 2003-09-21 13:53:16 UTC

Attachments (Terms of Use)
dummy1-1.0-1cl.noarch.rpm (1.65 KB, application/octet-stream)
2003-09-16 23:48 UTC, Gustavo Niemeyer
no flags Details
dummy1-2.0-1cl.noarch.rpm (1.24 KB, application/octet-stream)
2003-09-16 23:50 UTC, Gustavo Niemeyer
no flags Details
dummy2-2.0-1cl.noarch.rpm (1.65 KB, application/octet-stream)
2003-09-16 23:50 UTC, Gustavo Niemeyer
no flags Details

Description Gustavo Niemeyer 2003-09-16 23:46:32 UTC
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:

Steps to Reproduce:
In the description.

Additional info:

Comment 1 Gustavo Niemeyer 2003-09-16 23:48:07 UTC
Created attachment 94536 [details]

Comment 2 Gustavo Niemeyer 2003-09-16 23:50:03 UTC
Created attachment 94537 [details]

Comment 3 Gustavo Niemeyer 2003-09-16 23:50:54 UTC
Created attachment 94538 [details]

Comment 4 Gustavo Niemeyer 2003-09-16 23:52:41 UTC
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 13:53:16 UTC
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.