Skip to content
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

Add support for generating lockfiles to rpmtree #2

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

kellyma2
Copy link
Collaborator

This change introduces the necessary bits for producing lockfiles using rpmtree in lieu of having to hand craft them. It also tweaks the rpmtree() invocation in the BUILD file so that it correctly points at the lockfile derived repos.

This change introduces generation of the lockfile from the rpmtree
command.

Following the previous patterns with the other bazel files, this adds
some helper methods to bazel.go and creates a handler object to wrap
this up for rpmtree.

Worth noting is that to make this work we also have to tweak AddTree()
to take the configuration name because the generated repos are
different when using the lockfile.

This change leaves the MODULE.bazel configuration up to the user as
there may be some additional configuration for bazeldnf that is beyond
the scope of what rpmtree is doing and we don't want to interfere with
that.
(1) The error checking at the beginning isn't necessary because we also
    want to support WORKSPACE mode.

(2) If we pass the default configname through to AddTree() then we'll
    generate the WORKSPACE file as if we had a lock file, which is not
    what we desire
@kellyma2 kellyma2 requested a review from wade-arista December 31, 2024 07:22
cmd/rpmtree.go Outdated Show resolved Hide resolved
wade-arista
wade-arista previously approved these changes Jan 2, 2025
@wade-arista
Copy link
Collaborator

Haven't looked at this in very much detail

@kellyma2 kellyma2 merged commit 0904616 into aristanetworks:main Jan 3, 2025
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.

2 participants