Robustify the handling of malformed responses from the package repository server.  Add comments.