Smart resolution of package files