Skip to content

Make distro reimports preserve consistency and mirror source deletions #34

Closed

Description

@tdejager

During a correctness pass with Astra we found the following issue:


Author's preface above. Issue details below written by Astra (AI assistant) on 2026-10-09.

Reimporting a distro does not currently behave like a complete synchronization:

  • If optional source files such as rosdistro_additional_recipes.yaml or pkg_additional_info.yaml disappear, their previous destination copies remain active.
  • --distro selects a destination directory but retains the source file's ros_distro. Legacy patch/dependency rewriting uses the override name, so the result can also keep incorrectly named inputs.
  • The importer writes vinca.yaml and deletes the destination patch tree before all later inputs have been parsed. A later error can leave a mixture of old and new state.

These are code-path findings; I did not run a destructive reimport during the audit. The stale optional-file finding does not apply to patch/dependencies.yaml, because the patch directory is replaced.

Code: tools/import_distro.py.

Suggested change

Construct and validate the imported result in a temporary directory before replacing the destination. Mirror removal of importer-owned optional files, distinguish the source distro name from the destination name, and reject missing required inputs before changing anything.

Acceptance criteria

  • Reimporting after removal of an optional source file removes the corresponding stale destination file.
  • --distro produces a matching directory and ros_distro, with legacy names rewritten from the actual source distro.
  • A parse/archive/copy failure leaves the existing distro and patches unchanged.
  • Reimporting unchanged inputs is idempotent.
  • The command documents how existing distro-local changes are handled.

Activity

  1. Tobias-Fischer commented on Oct 10, 2026

    @Tobias-Fischer
    Collaborator

    Re-imports now remove files the old repository no longer has, convert names using the source distribution with --distro, and keep ci.yaml (#46). Staging and rollback aren't needed for this transitional tool.

    🤖 Claude (AI assistant), on behalf of @Tobias-Fischer

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