$ rpm -q yum yum-3.2.8-2.fc8.noarch We've got a private/local repo with a package or 2 with %pretrans scriptlets. These are installable fine with rpm, but fail when trying to install with yum: .... Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Traceback (most recent call last): File "/usr/bin/yum", line 29, in <module> yummain.main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 183, in main base.doTransaction() File "/usr/share/yum-cli/cli.py", line 401, in doTransaction self.runTransaction(cb=cb) File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 591, in runTransaction errors = self.ts.run(cb.callback, '') File "/usr/lib/python2.5/site-packages/yum/rpmtrans.py", line 315, in callback self._instCloseFile( bytes, total, h ) File "/usr/lib/python2.5/site-packages/yum/rpmtrans.py", line 378, in _instCloseFile self.ts_done(txmbr.po, txmbr.output_state) File "/usr/lib/python2.5/site-packages/yum/rpmtrans.py", line 211, in ts_done te_fn = '%s/transaction-done.%s' % (self.base.conf.persistdir, self._ts_time) AttributeError: RPMTransaction instance has no attribute '_ts_time'
This is known and fixed in yum upstream and in F9. It's unclear whether or not we'll backport at this time.
thx for the quick feedback, I guess we'll have to figure out a way to simply avoid using %pretrans in the short-term.
As a general rule avoid %pretrans, %postrans and triggers. they are painful.
Especially %pretrans. Because it's hard to run a script in an empty chroot...
I know all that, but %pretrans was the only/best way to work around some borkage in our local/site packages. I'll deal. :)
Part of the reason why %pretrans and %posttrans are painful is that they're used so little that bugs like this don't get caught early on. For some things %pretrans is really the one and only possibility atm and the empty chroot doesn't matter as long as the embedded lua interpreter is used instead of /bin/sh or such, and script is careful not assume things that might not be there.
yum 3.2.19 in f8 updates-testing fixes this problem.