Skip to content

#2250 uninstall commands from package manager - #2258

Open
JoelAdbu wants to merge 7 commits into
devonfw:mainfrom
JoelAdbu:feature/2250-uninstall-commands-from-package-manager
Open

#2250 uninstall commands from package manager#2258
JoelAdbu wants to merge 7 commits into
devonfw:mainfrom
JoelAdbu:feature/2250-uninstall-commands-from-package-manager

Conversation

@JoelAdbu

@JoelAdbu JoelAdbu commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2250

Implemented changes:

  • Redesigned the package manager architecture by moving installation and uninstallation logic into the package manager.
  • added new NativePackage abstraction that encapsulates package-specific information such as package names, additional installation options, setup commands, and cleanup commands.
  • Updated GlobalToolCommandlet to use the new architecture and added Linux uninstall support.
  • Migrated Docker and PgAdmin to the new native package management.

Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. Run mvn clean test
  2. Run the two new added tests:
  • NativePackageManagerTest
  • NativePackageTest

For Linux Users

  1. Checkout my branch
  2. start:
.\build-local-dev.sh

Docker

  1. Open a new bash and run:
ide install docker
  1. verify that Rancher Desktop is installed successfully.
  2. verify that the package is installed:
dpkg -l | grep rancher
  1. verify Rancher repository and key exist:
ls /etc/apt/sources.list.d/isv-rancher-stable.list
ls /usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg
  1. uninstall docker
ide uninstall docker
  1. verify that Rancher Desktop war removed:
dpkg -l | grep rancher

No package should be shown.

  1. verify that the Rancher repositroy and key were removed
ls /etc/apt/sources.list.d/isv-rancher-stable.list
ls /usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg

both commands should return No such file or directory.


PgAdmin

  1. Open a new bash and run:
ide install pgadmin
  1. verify that all pgadmin packages (pgadmin4, pgadmin4-server, pgadmin4-desktop, pgadmin4-web) are installed.
dpkg -l | grep pgadmin4

should show all 4 packages.

  1. uninstall pgadmin:
ide uninstall pgadmin
  1. verify pgadmin is removed
dpkg -l | grep pgadmin4

no package should be shown here.


Note

PgAdmin installation could not be fully verified on WSL. Testing on a native Linux machine is recommended.


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also 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). If no issue ID exists, title only.
  • PR top-level comment summarizes 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 labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

- Add NativePackage abstraction for package manager installations
- Add install and uninstall command generation to NativePackageManager
- refactor GlobalToolCommandlet, Pgadmin and docker accordingly
- add new test classes for NativePackageManagerTest and NativePackage
- fix line breaks
@coveralls

coveralls commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30885547918

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.1%) to 72.715%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

202 previously-covered lines in 13 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/GlobalToolCommandlet.java 39 2.19%
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 38 80.24%
com/devonfw/tools/ide/tool/docker/Docker.java 27 7.04%
com/devonfw/tools/ide/tool/ToolCommandlet.java 27 73.99%
com/devonfw/tools/ide/tool/pgadmin/PgAdmin.java 20 5.56%
com/devonfw/tools/ide/tool/ToolInstallRequest.java 18 71.88%
com/devonfw/tools/ide/tool/NativePackageManager.java 10 71.62%
com/devonfw/tools/ide/tool/gui/Gui.java 8 19.23%
com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java 7 91.9%
com/devonfw/tools/ide/tool/uv/UvBasedCommandlet.java 4 82.93%

Coverage Stats

Coverage Status
Relevant Lines: 17302
Covered Lines: 13126
Line Coverage: 75.86%
Relevant Branches: 7671
Covered Branches: 5033
Branch Coverage: 65.61%
Branches in Coverage %: Yes
Coverage Strength: 3.22 hits per line

💛 - Coveralls

- refactoring Version wont be handlet by NativePackage
- added NativePackageAction for logging
- added versionWildcard property to NativePackageManager
- added method getPackageSpec to build the version string (with wildcard) for install
- adjusted tests
- fixed method call of NativePackage for docker
-fixed zypper removce command
-fixed apt remove command
- fixed test according to previous changes
@JoelAdbu JoelAdbu added enhancement New feature or request linux specific for linux OS (debian, ubunutu, suse, etc.) uninstall uninstall tools or IDEasy itself labels Aug 4, 2026
@JoelAdbu
JoelAdbu marked this pull request as ready for review August 4, 2026 06:57
@JoelAdbu JoelAdbu self-assigned this Aug 4, 2026
@JoelAdbu JoelAdbu moved this from 🆕 New to Team Review in IDEasy board Aug 4, 2026
@JoelAdbu JoelAdbu moved this from Team Review to 🏗 In progress in IDEasy board Aug 4, 2026
@JoelAdbu JoelAdbu moved this from 🏗 In progress to Team Review in IDEasy board Aug 4, 2026
- small fix
@JoelAdbu JoelAdbu moved this from Team Review to 🏗 In progress in IDEasy board Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request linux specific for linux OS (debian, ubunutu, suse, etc.) ready-to-implement uninstall uninstall tools or IDEasy itself

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

Derive uninstall commands from package manager configuration (Linux)

2 participants