Bug 13495 - rpm update/freshen keeps old version
rpm update/freshen keeps old version
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-07-05 09:10 EDT by cain
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-17 05:42:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description cain 2000-07-05 09:10:56 EDT
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 14:42:52 EDT
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 04:49:27 EDT
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 00:10:58 EDT
What happens if you add --ignoresize ?
Comment 4 cain 2000-07-12 05:14:54 EDT
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 14:16:44 EDT
What happens if you add --ignoresize?
Comment 6 cain 2000-07-31 07:06:03 EDT
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 09:11:07 EDT
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 08:46:24 EDT
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 08:52:21 EDT
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 08:54:51 EDT
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 05:42:28 EDT
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 09:37:25 EDT
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.