[Rpm-maint] rpm-4.4.2.1: installing packages fails in rpmtsAcquireLock()

Andreas Haumer andreas at xss.co.at
Sun Aug 19 16:45:30 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Today I tried to upgrade to rpm-4.4.2.1 but it seems it
is broken, at least on my system...

The problem: rpm-4.4.2.1 denies to upgrade a package with
the following error message:

error: can't create transaction lock on /

and the upgrade fails, of course.

An strace() on this action shows the following:

[...]
rt_sigprocmask(SIG_BLOCK, ~[], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
close(7)                                = 0
umask(022)                              = 022
open("/", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = -1 EISDIR (Is a directory)
umask(022)                              = 022
open("/", O_RDONLY|O_LARGEFILE)         = 7
write(2, "error: ", 7error: )                  = 7
write(2, "can\'t create transaction lock on"..., 35can't create transaction lock on /
) = 35
close(7)                                = 0
[...]


I debugged the application and found that the error occurs
in function rpmtsAcquireLock() in file "lib/rpmlock.c". This
function seems to try to aquire a lock on the root-directory
("/") with mode RPMLOCK_WRITE which it can't, because function
rpmlock_new(), which is used to get the lock, could only open
the directory in O_RDONLY mode (because the call to open()
with flags "O_RDWR|O_CREAT|O_LARGEFILE" returns an EISDIR error)


This is on a Linux system completely compiled by myself
with the following basic packages:

linux-2.4.34.5
glibc-2.3.6
gcc-4.2.1

Until today I was using rpm-4.1.1 which was working fine.

Any idea how to solve this problem?

- - andreas

- --
Andreas Haumer                     | mailto:andreas at xss.co.at
*x Software + Systeme              | http://www.xss.co.at/
Karmarschgasse 51/2/20             | Tel: +43-1-6060114-0
A-1100 Vienna, Austria             | Fax: +43-1-6060114-71
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyHOmxJmyeGcXPhERAkhLAKCeyj6vGes291FOS9uhFQb4z6SckgCfSJ0M
ilzgaTKZL5f7W83jrsI7QPA=
=EB65
-----END PGP SIGNATURE-----



More information about the Rpm-maint mailing list