package_patch (simple version)

Cherry picking the earlier version of #1679