This diff syncs package_latest() with the changes to package_present(). I have not managed to figure out how to handle the cornercases where stderr is set but the command has not failed, so leave a FIXME blob for other adventurers.