Add pkg_spec attribute to MarkingError.
Log packages causing history undo failures.