refactor MyPackageInfo class to support both PackageInfo and ResolveInfo.