On Tue, Sep 07, 2004 at 05:01:37AM -0700, Steve G wrote:
>> $ rpm -e kernel-2.6.5-1.358 kernel-2.6.8-1.541
>> error: can't create transaction lock
>Doesn't this assume that ALL transaction lock problems are permissions
>related?
No. There are a variety of reasons why this might fail. There's
more than one
value for errno returned.
Indeed there might be another write rpm operation happening!
>Does rpm have the capability to inherently know that its a permission
>problem?
errno is set, its just a matter of using it in the error message.
This is fair enough
>Can you assume that every rpm installation in use requires root?
This is actually a good point. rpm should check the uid to see if its
root.
If not print a warning that there may be permission problems and re-run as
root to avoid this warning. This patch has been on my todo list for a while.
I'm not sure that's ideal behaviour - it is possible to use things such as
--dbpath and --root (ignoring not being able to move the transaction lock for
the moment). I wouldn't expect a failed (EPERM) rm command to suggest
rerunning as root, likewise for rpm.
Also theoretically we could have a "package_installer_r" with selinux to enable
certain rpm install operations.
As always bugzilla or rpm-list the best places for RFEs or this sort of
discussion.
Paul