The second patch (which includes the changes in the previous one) addresses the cases where there is a tag #optional in the code but no indication of which optional pakage is required, for the elliptic_curves directory only.
With sage-5.4.beta1 with no optional spkgs installed, all tests pass if -optional is not given, while if -optional is given then there are two failures in elliptic_curve/, both due to {{{database_cremona_ellcurve}} not being installed. After installing that one optional spkg, all these pass. That is as it should be.
Since I added to the patch it needs a second referee.