Skip to content

#809: Enhance uninstall with --force to remove from the software repo#1242

Merged
hohwille merged 22 commits intodevonfw:mainfrom
juliane-cap:809-uninstall-force-remove-from-repo
May 20, 2025
Merged

#809: Enhance uninstall with --force to remove from the software repo#1242
hohwille merged 22 commits intodevonfw:mainfrom
juliane-cap:809-uninstall-force-remove-from-repo

Conversation

@juliane-cap
Copy link
Contributor

@juliane-cap juliane-cap commented Apr 15, 2025

Fixes: #809

Implements:

  • function to fully delete a tool from the _ide software repository via --force
  • unit test for the forced uninstall

… software repo

Implements: functions to fully delete a tool from the _ide software repository
@CLAassistant
Copy link

CLAassistant commented Apr 15, 2025

CLA assistant check
All committers have signed the CLA.

@juliane-cap juliane-cap moved this from 🆕 New to Team Review in IDEasy board Apr 15, 2025
@juliane-cap juliane-cap self-assigned this Apr 15, 2025
@juliane-cap juliane-cap added enhancement New feature or request uninstall uninstall tools or IDEasy itself labels Apr 15, 2025
@coveralls
Copy link
Collaborator

coveralls commented Apr 15, 2025

Pull Request Test Coverage Report for Build 15062852418

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 26 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 67.719%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 26 83.12%
Totals Coverage Status
Change from base Build 15050843818: 0.01%
Covered Lines: 8016
Relevant Lines: 11430

💛 - Coveralls

Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliane-cap thanks for the enhancement of the uninstall commandlet with the force mode.
Everything looks fine to me. It would be nice if you could also add some simple tests which ensure that the software was actually deleted from the repository.
I've also added some small change requests, please check these.

@juliane-cap
Copy link
Contributor Author

juliane-cap commented Apr 15, 2025

@jan-vcapgemini would LocalToolCommandlet.forceUninstall() work on macOs or should i use the macOsHelper to get the real path?
Path repoPath = getInstalledSoftwareRepoPath();
Path realPath = getMacOsHelper().findLinkDir(repoPath, getBinaryName());

Add macOS workaround to find the right path
@juliane-cap juliane-cap marked this pull request as ready for review April 17, 2025 09:23
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a new test and implementing the CRs. I've added some more very small CRs, after these are solved, the PR is ready for review.

@jan-vcapgemini
Copy link
Contributor

@jan-vcapgemini would LocalToolCommandlet.forceUninstall() work on macOs or should i use the macOsHelper to get the real path? Path repoPath = getInstalledSoftwareRepoPath(); Path realPath = getMacOsHelper().findLinkDir(repoPath, getBinaryName());

Your current implementation with the added check for MacOs should work fine I think.

@juliane-cap juliane-cap marked this pull request as draft April 23, 2025 10:25
Refactor path format in UninstallCommandletTest, Double-check for macOS before applying path change in LocalToolCommandlet
@juliane-cap juliane-cap marked this pull request as ready for review April 24, 2025 06:49
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliane-cap thanks for your PR and rework. Great job and nice improvements (including help texts, etc.). 👍
I still left some review comments for improvement. When resolved we can finally merge.

@hohwille hohwille added this to the release:2025.05.002 milestone May 15, 2025
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliane-cap thanks for addressing all review comments. Perfect now and ready for merge Good job👍

@hohwille hohwille moved this from Team Review to 👀 In review in IDEasy board May 20, 2025
@hohwille hohwille self-assigned this May 20, 2025
@hohwille hohwille merged commit 9e7830e into devonfw:main May 20, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDEasy board May 20, 2025
@jan-vcapgemini
Copy link
Contributor

I've tested these changes on Linux, Mac and Windows and it worked on all systems.

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

Labels

enhancement New feature or request uninstall uninstall tools or IDEasy itself

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

make uninstall with --force also remove from software repo

5 participants