Repository navigation
git: Expose a fetch as a source tree - #431
Merged
Merged
Conversation
rpm.package() only takes a source tree from a dependency that provides
SourceTreeInfo. A populated git.fetch() is a checkout, which provides it,
but an unpopulated one is the prelude's git_fetch(), which doesn't. Every
rpm.package() that builds from a fetched checkout then fails analysis:
Attribute requires a dep that provides `SourceTreeInfo`, but it was not found on `root//packages/systemd:systemd.git`. Found these providers: DefaultInfo
Let's declare the git_fetch() under a name of its own and expose it under
the name of the fetch with a rule that adds SourceTreeInfo, so both kinds
of fetch provide the same providers.
Signed-off-by: Daan De Meyer <daan@amutable.com>
martinpitt
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rpm.package() only takes a source tree from a dependency that provides SourceTreeInfo. A populated git.fetch() is a checkout, which provides it, but an unpopulated one is the prelude's git_fetch(), which doesn't. Every rpm.package() that builds from a fetched checkout then fails analysis:
Let's declare the git_fetch() under a name of its own and expose it under the name of the fetch with a rule that adds SourceTreeInfo, so both kinds of fetch provide the same providers.