Skip to content

Compatibility packages: also require the distribution's mutex - #171

Merged
traversaro merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/compat-alias-mutex
Oct 10, 2026
Merged

traversaro merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/compat-alias-mutex

Conversation

@Tobias-Fischer

Copy link
Copy Markdown
Contributor

With package_name_mode: both, each ros-<distro>-<pkg> alias only required ros2-<pkg> ==<version>. When several distributions publish to one channel, another distribution's build of the same version satisfies that, so e.g. ros-lyrical-foo could pull in jazzy's ros2-foo.

The alias now also requires the mutex spec the canonical packages get (get_mutex_package_dependency, e.g. ros2-distro-mutex 0.21.* lyrical_*). Since every canonical build depends on its distribution's mutex and only one mutex build can be installed, this selects the right ros2-<pkg> build.

Why not pin the exact build of ros2-<pkg>: the alias is a separate recipe, so its build string (hash + number) isn't known when the recipe is generated (pin_subpackage(exact=True) only works within one recipe), and a rebuild of ros2-<pkg> would then need a rebuild of the alias too. The mutex is what already distinguishes distributions.

String-form mutex_package (legacy): the string is used verbatim, exactly as for the canonical packages; it disambiguates only as far as that string does (e.g. ... humble / humble_* build string). No mutex_package: unchanged.

is_legacy_compatibility_output now matches on the first run requirement so it recognises the new aliases.

Verified: new parametrized test (dict and string mutex); full vinca suite passes (263 passed); generated recipes for lyrical (on top of the current robostack-integration branch) contain e.g.

requirements:
  run:
    - ros2-easynav ==0.4.2
    - ros2-distro-mutex 0.21.* lyrical_*

🤖 Generated with Claude Code

ros-<distro>-<pkg> aliases only required ros2-<pkg> ==<version>. With several
distributions publishing to one channel, another distribution's build of the
same version satisfied the alias. Add the same mutex spec the canonical
packages use (e.g. ros2-distro-mutex 0.21.* lyrical_*; a string-form
mutex_package is used verbatim).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobias-Fischer added a commit to Tobias-Fischer/robostack-distros that referenced this pull request Oct 10, 2026
…ex (#69)

RoboStack/vinca#171 makes each ros-<distro>-<pkg> alias depend on its
distribution's mutex as well as on ros2-<pkg> ==<version>; the check counted
exactly one dependency and would treat such aliases as real packages. Both forms
are accepted, so this can merge before the vinca pin moves.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@traversaro
traversaro merged commit 39c4eaa into RoboStack:master Oct 10, 2026
3 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