Bug 13495 - rpm update/freshen keeps old version
Summary: rpm update/freshen keeps old version
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-07-05 13:10 UTC by cain
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-08-17 09:42:32 UTC

Attachments (Terms of Use)

Description cain 2000-07-05 13:10:56 UTC
After updating wu-ftpd from RH6.2 original version wu-ftpd-2.6.0-3 using
>rpm -Uhv wu-ftpd-2.6.0-14.6x.i386.rpm
both version are listed as installed packages
>rpm -qa |grep wu-ftp
(same for rpm -F)

And neither the old nor the new version can be removed. rpm finishes by 
>  rpm -evv wu-ftpd-2.6.0-14.6x
D: opening database mode 0x82 in /var/lib/rpm
D: getting list of mounted filesystems

without removing it.

Comment 1 Jeff Johnson 2000-07-10 18:42:52 UTC
You are hung while stat'ing a mount point, probably a NFS mount point. Add
as a work around. Do
	rpm -evv --allmatches wu-ftpd
to erase both database entries, then install the package again, adding
--ignoresize if

Comment 2 cain 2000-07-11 08:49:27 UTC
Thank you for this comment.

But even  "rpm -evv --allmatches wu-ftpd" states only
D: opening database mode 0x82 in /var/lib/rpm
D: getting list of mounted filesystems

without erasing any of the wu-ftpd packages.

Same happens when all imported nfs are unmounted.

Comment 3 Jeff Johnson 2000-07-12 04:10:58 UTC
What happens if you add --ignoresize ?

Comment 4 cain 2000-07-12 09:14:54 UTC
Since I cannot remove the packages normal installation doesn't work:
#rpm -ihv --ignoresize wu-ftpd-2.6.0-14.6x.i386.rpm
package wu-ftpd-2.6.0-14.6x is already installed
file /usr/bin/ftpcount from install of wu-ftpd-2.6.0-14.6x conflicts with file
from package wu-ftpd-2.6.0-3
file /usr/bin/ftpwho from install of wu-ftpd-2.6.0-14.6x conflicts with file
from package wu-ftpd-2.6.0-3

using --force reinstalls the package:
#rpm -ihv --ignoresize --force wu-ftpd-2.6.0-14.6x.i386.rpm
wu-ftpd                     ##################################################

same for freshen (-F) and update (-U).

but removing the packages still fails.

Comment 5 Jeff Johnson 2000-07-19 18:16:44 UTC
What happens if you add --ignoresize?

Comment 6 cain 2000-07-31 11:06:03 UTC
Add to which command ?
--ignoresize only works for installing packages, not for removing.
But I want to get rid of multiple database entries for different versions of the
same package.

Comment 7 Jeff Johnson 2000-07-31 13:11:07 UTC
Apologies for the misinformation with --ignoresize.

I stiill believe that you are blocking while trying to find the size of mounted
file systems. Do
you have anything other than NFS mounts?

Comment 8 cain 2000-08-02 12:46:24 UTC
No, there are only nfs mounts. So I unmounted them.
Now mount shows:

/dev/hda1 on / type ext2 (rw)
none on /proc type proc (rw)
/dev/hda5 on /dqs type ext2 (rw)
/dev/hda7 on /usr/vice type ext2 (rw)
none on /dev/pts type devpts

Trying rpm -evv ... stops again after
 D: getting list of mounted filesystems.

further try: As I found out the problem occurs only on dual processor machines.
On single proc machine rpm works fine.
So I first installed the standard RedHat smp kernel (vmlinuz-2.2.14-12smp)
and later the standard vmlinuz-2.2.14-12 single proc kernel, both without any
influence on the rpm problem.

Comment 9 Jeff Johnson 2000-08-02 12:52:21 UTC
OK, try doing
	cd /var/lib
	tar czvf /tmp/rpmdb.tar.gz rpm
	strace -o /tmp/rpm.strace rpm -evv <whetever>
and mail it off to me <jbj@redhat.com> and I'll take a look.

Comment 10 Jeff Johnson 2000-08-02 12:54:51 UTC
Sorry, "it" means both /tmp/rpmdb.tar.gz and /tmp/rpm.strace. You might want to
/tmp/rpm.strace, and, if it appears to be looping, stop the strace with a ^C.


Comment 11 cain 2000-08-17 09:42:28 UTC
After a week of further tries I found out what messed up the rpm database.
Ist due to our kickstart installation (which actually differs a bit between smp
and single proc
machines - so forget about the remark mentioned above).
In the postinstall section of the kickstart file the /var/tmp and /usr/tmp dirs
are removed and linked
to /tmp, which is on different partition:
mv /var/tmp/* /tmp
rm -rf /var/tmp /usr/tmp
ln -s /tmp /var/tmp
ln -s /tmp /usr/tmp

After reboot the described problems occur.

Now I put these commands into a small script with an additional sync an run it
at first reboot.
This seems to work.

Can you explain, why rpm depends on /var/tmp even when the directory is empty (I
did a ls -al before removing it).

Comment 12 Jeff Johnson 2000-08-17 13:37:25 UTC
I'm glad that you found the problem, as I've had not a clue.

rpm needs a directory to construct scripts from %pre/%post et al tags. This is
is configurable
using the macro %_tmppath with default of /var/tmp. Weirdness ensues quickly if
directory does not exist.

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