Description of problem: Due to operator error, I managed to create an empty jar file (containing only META-INF/MANIFEST.MF). Then aot-compile-rpm crashed: + /usr/bin/aot-compile-rpm Traceback (most recent call last): File "/usr/bin/aot-compile-rpm", line 66, in <module> compiler.compile() File "/usr/lib/python2.5/site-packages/aotcompile.py", line 98, in compile self.writeMakefile(MAKEFILE, jobs) File "/usr/lib/python2.5/site-packages/aotcompile.py", line 124, in writeMakefile (job.dsoName(), job.dbName()) for job in jobs]))} TypeError: reduce() of empty sequence with no initial value error: Bad exit status from /var/tmp/rpm-tmp.78936 (%install) It took me a little digging through the code to figure out what that crash meant. It would be good to catch this exception and issue an error message instead, perhaps "You dummy, there's nothing in your JAR file!" Version-Release number of selected component (if applicable): java-1.5.0-gcj-devel-1.5.0.0-14.fc7 How reproducible: Always Steps to Reproduce: 1. Write an RPM script that produces an empty jar file. Have the %build script execute "jar cf some.jar", for example. 2. Invoke aot-compile-rpm in the %install section 3. Invoke rpmbuild on the script Actual results: aot-compile-rpm crashes with the stacktrace given above Expected results: aot-compile-rpm should instead warn that it was given an empty JAR file Additional info:
I've managed to generate the same error on F8 under the same circumstances. As I'm not a Python person, I didn't know what I doing was wrong until some Googling brought me here.
Gary, can you take a quick look at this one?
I committed a fix.