Skip to content

WIP: Populate companyname and other properties for PSResourceInfo #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

anamnavi
Copy link
Member

@anamnavi anamnavi commented Jul 20, 2022

When installing a package, save companyname, copyright and other metadata information to metadata xml file. Also change setters access levels for these properties of the PSResourceInfo class. Get-PSResource will now return consistent information for packages installed with Install-PSResource cmdlet after this fix.

When finding a package, companyname and other related information is not easily accessibly via the json metadata (IPackageSearchMetadata object returned via NuGet GetSearchAsync() and GetMetadataAsync() search APIs and currently is more operational cost than is worth to get this field. Here is a link listing the package information accessible via the package nuspec (note company name is not listed):
https://docs.microsoft.com/en-us/nuget/reference/nuspec

PR Summary

PR Context

Resolves #267

PR Checklist

@anamnavi anamnavi requested review from PaulHigin and alerickson July 20, 2022 16:16
@anamnavi anamnavi changed the title populate companyname and other properties for PSResourceInfo Populate companyname and other properties for PSResourceInfo Jul 20, 2022
@@ -540,6 +540,10 @@ private IEnumerable<PSResourceInfo> FilterByInstalledPkgs(IEnumerable<PSResource
}

moduleManifestVersion = parsedMetadataHashtable["ModuleVersion"] as string;
pkg.CompanyName = parsedMetadataHashtable["CompanyName"] as string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know that parsedMetadataHashtable will always have these entries?

@PaulHigin
Copy link
Contributor

@anamnavi, @alerickson please look at authenticode check test failures.

@anamnavi anamnavi changed the title Populate companyname and other properties for PSResourceInfo WIP: Populate companyname and other properties for PSResourceInfo Aug 4, 2022
@anamnavi anamnavi closed this Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find-PSResource should preserve company name
2 participants