Skip to content

Preserve integration files shared by another installed repository - #5576

Open
SeoFood wants to merge 1 commit into
hacs:mainfrom
SeoFood:seofood/preserve-shared-integration-directory
Open

SeoFood wants to merge 1 commit into
hacs:mainfrom
SeoFood:seofood/preserve-shared-integration-directory

Conversation

@SeoFood

@SeoFood SeoFood commented Oct 11, 2026

Copy link
Copy Markdown

When two installed integration repositories use the same directory, uninstalling either one currently deletes the files needed by the other entry, which still reports itself as installed.

Preserve that directory while another installed repository claims the same normalized local path. The selected entry still goes through the existing uninstall cleanup, including its stored installation metadata, HACS device and removal issue. Uninstalling the last remaining repository removes the directory normally.

All 125 repository, filesystem and cleanup tests pass on Home Assistant 2025.3.0 with Python 3.13.16, including 15 new cases. Six of the new cases fail against the original code. They cover shared and exclusive paths, uninstalled entries, duplicate IDs, path normalization, legacy domain overrides, failure handling and the complete uninstall cleanup. Ruff, formatting, isort and codespell pass for both changed files.

Related to #5571. This addresses the shared-directory deletion reported in the discussion; repository switching and fork-aware updates remain separate work.

This branch has not been deployed

No deployments
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.

1 participant