Hide Forgot
In EL6.2, there are a handful of rpms that use lua for rpm %post/%postun scripts. When these rpms are upgraded manually using 'rpm -Uv', rpm complains that it cannot find the rest of the rpms after processing the first rpm that uses a lua script. Using yum works but it's not always an option. I've attached 2 proof of concept rpm spec files which will show the problem. To reproduce, build the rpms and run: cd /path/to/rpms && rpm -Uvh test{foo,bar}*.rpm The output looks like this: [root@optimus ~]# ls anaconda-ks.cfg install.log.syslog testbar-1.0-1.sc00.x86_64.rpm install.log ks-post.log testfoo-1.0-1.sc00.x86_64.rpm [root@optimus ~]# rpm -Uvh test*.rpm Preparing... ########################################### [100%] 1:testfoo ########################################### [ 50%] Tue 10 Apr 2012 11:52:46 AM PDT error: open of testbar-1.0-1.sc00.x86_64.rpm failed: No such file or directory runLuaScript() doesn't properly reset the current working directory after running the lua script. The attached patch fixes the problem for me. [root@optimus ~]# rpm -e testfoo [root@optimus ~]# rpm -Uvh test*.rpm Preparing... ########################################### [100%] 1:testfoo ########################################### [ 50%] Tue 10 Apr 2012 12:33:55 PM PDT 2:testbar ########################################### [100%]
Created attachment 576575 [details] testbar.spec
Created attachment 576576 [details] testfoo.spec
Created attachment 576577 [details] fix chroot handling for lua scripts
Created attachment 577219 [details] lua script chroot v1.1 The previous patch broke mock. Apparently, the result of rpmtsCurrDir() cannot be trusted and I had to use getcwd() instead.
This is a dupe of bug 746190 (which is a closed bug, for whatever reason). In any case, its being addressed.
Since RHEL 6.3 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This has been fixed as of http://rhn.redhat.com/errata/RHBA-2012-0909.html *** This bug has been marked as a duplicate of bug 746190 ***
Clearing up leftover review flag