Bug 99304
Summary: | rpm -U --relocate <old>=<new> does delete files | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <stefan.harms> | ||||
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 9 | CC: | jason.brittain | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-11-29 19:44:36 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Need Real Name
2003-07-17 11:45:05 UTC
Can you supply an explicit test case? Otherwise, I cannot fix anything. Created attachment 95114 [details]
Test case that reproduces the problem.
Here's how to reproduce this bug on Red Hat 9: Download my test case tar.gz file: https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=95114&action=view Unpack the test case source in /tmp: # cd /tmp # tar zxvf bz-99304-testcase.tar.gz # cd bz-99304-testcase Build the relocateable-1.0-1.noarch.rpm package: # ./build1.sh Build the relocateable-1.0-2.noarch.rpm package: # ./build2.sh Install the relocateable-1.0-1.noarch.rpm package: # rpm -ivh --prefix /tmp/bz-99304-testcase/test RPMS/noarch/relocateable-1.0-1.noarch.rpm Preparing... ########################################### [100%] 1:relocateable ########################################### [100%] List all files installed as part of the "relocateable" package: # rpm -ql relocateable /tmp/bz-99304-testcase/test /tmp/bz-99304-testcase/test/readme.txt Query RPM to find out what package owns the test/readme.txt file: # rpm -qf test/readme.txt relocateable-1.0-1 # ls -la test/readme.txt -rw-r--r-- 1 root root 74 Oct 10 19:01 test/readme.txt # cat test/readme.txt Hi! This file is the only file contained in the relocateable RPM package. Looks good.. Now upgrade to the relocateable-1.0-2.noarch.rpm package, in the same prefix in the file system: # rpm -Uvh --prefix /tmp/bz-99304-testcase/test RPMS/noarch/relocateable-1.0-2.noarch.rpm Preparing... ########################################### [100%] 1:relocateable ########################################### [100%] Now look at the packages files: # cat test/readme.txt cat: test/readme.txt: No such file or directory # ls -la test ls: test: No such file or directory But, RPM says it should be there. # rpm -ql relocateable /tmp/bz-99304-testcase/test /tmp/bz-99304-testcase/test/readme.txt Try upgrading it again (second upgrade attempt), just after that with --force: # rpm -Uvh --force --prefix /tmp/bz-99304-testcase/test RPMS/noarch/relocateable-1.0-2.noarch.rpm Preparing... ########################################### [100%] 1:relocateable ########################################### [100%] Now look at the packages files: # cat test/readme.txt Hi! This file is the only file contained in the relocateable RPM package. # ls -la test/readme.txt -rw-r--r-- 1 root root 74 Oct 10 19:01 test/readme.txt It shows back up again on the second attempt to upgrade to the same RPM. All subsequent requests to upgrade to the same RPM work fine too, it's just the first time you try to upgrade to a new rev ("Release") of the package. At least on my RH9 machine, if you don't relocate the package, upgrading it seems to work fine. But, I want to be able to relocate it. :) I was unable to reproduce this same behavior on Red Hat 7.3. Thanks! Hi there. This bug doesn't seem to be getting any attention. Is someone working on it? It says it's assigned to (Jeff Johnson), but that the status is still NEEDINFO. Is that status wrong? If not, what info is still missing? I'd really like this bug fixed. Tested your case (thanks for the detailed test case) on rpm-4.4.2-9.i386 (tomorrows rawhide) and worked: rpm -Uvh --prefix /tmp/bz-99304-testcase/test/ RPMS/relocateable-1.0-2.noarch.rpm Preparing... ########################################### [100%] 1:relocateable ########################################### [100%] [pauln@enki bz-99304-testcase]$ cat test/readme.txt Hi! This file is the only file contained in the relocateable RPM package. $ rpm -ql relocateable /tmp/bz-99304-testcase/test /tmp/bz-99304-testcase/test/readme.txt $ rpm -q relocateable relocateable-1.0-2.noarch I must say that I'm not at all surprised that it works, when you test it more than two years later. :) Thanks. |