Skip to content

Add ExtractNameFromRPMPath() to rpm.go#6370

Merged
dmcilvaney merged 4 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/2.0/tools/delta/optimize_implicits_parts/rpm_funcs
Nov 21, 2023
Merged

Add ExtractNameFromRPMPath() to rpm.go#6370
dmcilvaney merged 4 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/2.0/tools/delta/optimize_implicits_parts/rpm_funcs

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Oct 9, 2023

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

In preparation for an implicit provides optimization PR (RFC/PoC: #6298), add a function to rpm:

  • ExtractNameFromRPMPath(): Extracts the name of a package from it full filename. i.e., pkg-name-1.2.3-4.cm2.x86_64.rpm -> pkg-name. This needs to run on paths to files thay may not exist to using rpm -q ... isn't possible here.
Change Log
  • Add ExtractNameFromRPMPath()
Does this affect the toolchain?

NO

Test Methodology
  • Local

@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Oct 9, 2023
@dmcilvaney dmcilvaney force-pushed the damcilva/2.0/tools/delta/optimize_implicits_parts/rpm_funcs branch from 1976393 to d616c80 Compare November 10, 2023 19:14
@dmcilvaney dmcilvaney force-pushed the damcilva/2.0/tools/delta/optimize_implicits_parts/rpm_funcs branch from 7079605 to 04be935 Compare November 10, 2023 19:26
@dmcilvaney dmcilvaney marked this pull request as ready for review November 10, 2023 19:27
@dmcilvaney dmcilvaney requested a review from a team as a code owner November 10, 2023 19:27
Comment thread toolkit/tools/internal/rpm/rpm_test.go
Comment thread toolkit/tools/internal/rpm/rpm.go Outdated
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS left a comment

Choose a reason for hiding this comment

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

Just 2 minor comments.

@dmcilvaney dmcilvaney merged commit 0ae5d72 into microsoft:main Nov 21, 2023
@dmcilvaney dmcilvaney deleted the damcilva/2.0/tools/delta/optimize_implicits_parts/rpm_funcs branch November 21, 2023 22:08
gmileka pushed a commit that referenced this pull request Dec 7, 2023
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
rlmenge pushed a commit that referenced this pull request Dec 21, 2023
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants