镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Builds from source repositories: control submodule pull #127

Open

Description

@gavanderhoorn

Lately I've been building most packages directly from their source repositories. Not best-practice perhaps, but in this case a necessity.

Adding an entry to rosdistro_additional_recipes.yaml is easy enough and works well.

Some of those repositories however use submodules, and similar to the motivation given in prefix-dev/rattler-build#2107 it would be nice if we could prevent those submodules from getting pulled: they may not be necessary for the build of a particular package from a set of packages in a (mono)repository or undesired for other reasons.

prefix-dev/rattler-build#2158 seems to have added a way to make rattler-build ignore them, but I couldn't find a way for Vinca to generate recipes that added the submodules: false key-value pair to the source dict.

Would there be interest in adding this? If so, what would be the nicest way of doing that?

Activity

  1. gavanderhoorn commented on Jul 18, 2026

    @gavanderhoorn
    ContributorAuthor

    I currently have a very ugly hack that adds this to main.py:

    diff --git a/vinca/main.py b/vinca/main.py
    index eb5b148..b73f9d3 100644
    --- a/vinca/main.py
    +++ b/vinca/main.py
    @@ -683,6 +683,7 @@ def generate_source(distro, vinca_conf):
             entry = {}
             entry["git"] = url
             entry[ref_type] = ref
    +        entry["submodules"] = vinca_conf["_snapshot"][pkg_shortname].get("submodules", True)
             pkg_names = resolve_pkgname(pkg_shortname, vinca_conf, distro)
             pkg_version = distro.get_version(pkg_shortname)
             print("Checking ", pkg_shortname, pkg_version)

    This works (add a submodules: false to rosdistro_additional_recipes.yaml for a specific package and the recipe generated will contain the required key as well).

    It's a hack because I don't like I'm directly indexing into vinca_conf, but without spending more time I couldn't immediately see a way to access the key-value pairs for a specific package in rosdistro_additional_recipes.yaml.


    Edit: it only 'works' with rattler-build>=0.58 btw, as that's the first release that included prefix-dev/rattler-build#2158.

  2. Tobias-Fischer commented on Jul 24, 2026

    @Tobias-Fischer
    Contributor

    I think this works for me if you want to open a pull request @gavanderhoorn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions