Skip to content

#2466: remove broken software links on uninstall - #2496

Open
HadiDawoud wants to merge 3 commits into
devonfw:mainfrom
HadiDawoud:feature/2466-uninstall-broken-link
Open

HadiDawoud wants to merge 3 commits into
devonfw:mainfrom
HadiDawoud:feature/2466-uninstall-broken-link

Conversation

@HadiDawoud

@HadiDawoud HadiDawoud commented Sep 16, 2026

Copy link
Copy Markdown

This PR fixes #2466

Implemented changes:

  • ide uninstall also removes broken software symlinks under $IDE_HOME/software/«tool»
  • Leftover software folders (e.g. only .ide.software.version) are cleaned up as well
  • Broken links are detected with NOFOLLOW_LINKS during local tool uninstall
  • Added unit tests for broken-link and leftover-folder cases

Testing instructions

  1. Run mvn -pl cli -Dtest=UninstallCommandletTest test and verify all 11 tests pass
  2. Optional manual reproduce from the issue: ide install gradle, delete the version under $IDE_ROOT/_ide/software/default/gradle, then ide uninstall gradle the broken link under $IDE_HOME/software/gradle should be removed
  3. Optional: create $IDE_HOME/software/pip with only .ide.software.version, run ide uninstall pip the folder should be removed

Checklist for this PR

Make sure everything is checked before merging this PR. For further info see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@CLAassistant

CLAassistant commented Sep 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HadiDawoud HadiDawoud added uninstall uninstall tools or IDEasy itself bugfix PR that fixes a bug issue labels Sep 16, 2026
@HadiDawoud HadiDawoud moved this from 🆕 New to Team Review in IDEasy board Sep 16, 2026
@HadiDawoud
HadiDawoud force-pushed the feature/2466-uninstall-broken-link branch from bdd7ea6 to 3b2f22c Compare September 16, 2026 11:39
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 35190508609

Coverage increased (+0.005%) to 74.163%

Details

  • Coverage increased (+0.005%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 9 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

9 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 6 79.74%
com/devonfw/tools/ide/version/VersionSegment.java 2 90.81%
com/devonfw/tools/ide/commandlet/UninstallCommandlet.java 1 92.31%

Coverage Stats

Coverage Status
Relevant Lines: 19008
Covered Lines: 14731
Line Coverage: 77.5%
Relevant Branches: 8518
Covered Branches: 5683
Branch Coverage: 66.72%
Branches in Coverage %: Yes
Coverage Strength: 3.31 hits per line

💛 - Coveralls

@shodiBoy1

Copy link
Copy Markdown
Contributor

Thanks @HadiDawoud, nice fix.

Tested this on Mac and Windows.

Unit tests: UninstallCommandletTest - 11/11 passed.

Manual: installed gradle, deleted $IDE_ROOT/_ide/software/default/gradle so software/gradle became a broken link, then ran uninstall from this branch. Got Successfully uninstalled gradle and the link was gone. Same on Windows (Explorer showed “location is not available” before uninstall, folder gone after).

Looks good to me, the original issue is fixed.

@shodiBoy1 shodiBoy1 moved this from Team Review to 👀 In review in IDEasy board Sep 18, 2026
@HadiDawoud HadiDawoud moved this from 👀 In review to 🏗 In progress in IDEasy board Sep 21, 2026
@HadiDawoud HadiDawoud moved this from 🏗 In progress to 👀 In review in IDEasy board Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue uninstall uninstall tools or IDEasy itself

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

ide uninstall should also remove broken link

4 participants