pyinstaller/pyinstaller — pull request #79 by agrue (2013-09-17 05:18:10+00:00)
Title: Fix: Prevent zipped eggs potentially being skipped for extraction.

I was bitten by this problem recently. Mutating the TOC during iteration in this function causes items to be skipped over. That means if two zipped eggs are listed in succession, the first will be correctly handled but the second will be skipped, meaning it doesn't end up in the packaged app.

The fix is to create a new TOC instead of mutating the old one. The only existing call to _extract_from_egg doesn't rely on the mutating behaviour, so it should be safe to remove. It fixed my problem, and I tested it and it doesn't break any tests (OS X 10.8 and Windows 7).