Skip to content

git: Expose a fetch as a source tree - #431

Merged
martinpitt merged 1 commit into
amutable:mainfrom
daandemeyer:source-tree-fetch
Nov 23, 2026
Merged

martinpitt merged 1 commit into
amutable:mainfrom
daandemeyer:source-tree-fetch

Conversation

@daandemeyer

Copy link
Copy Markdown
Member

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.

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
martinpitt merged commit 6c78b8e into amutable:main Nov 23, 2026
6 checks passed
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