Skip to content

#2190: IDEasy destroys python installation - #2212

Open
vivu001 wants to merge 1 commit into
devonfw:mainfrom
vivu001:feature/2190-fix-IDEasy-destroys-python-installation
Open

#2190: IDEasy destroys python installation#2212
vivu001 wants to merge 1 commit into
devonfw:mainfrom
vivu001:feature/2190-fix-IDEasy-destroys-python-installation

Conversation

@vivu001

@vivu001 vivu001 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2190

Implemented changes:

  • Added missing-version-file recovery for preserved local tools.
  • Restored the version marker instead of reinstalling Python.
  • Kept the existing Python installation intact.

Testing instructions

  1. Run ./build-local-dev.sh to build the native image.
  2. If Python is not already installed, run ide install python once (or Spyder) and delete the file $[IDE_HOME]/software/python/.ide.software.version.
  3. Run command
ide install python

Result:

$ ide install python
Tool python is missing version file in C:\Users\xxx\projects\IDEasy\software\python\.ide.software.version
No CVEs found for version 0.12.0 of tool uv.
Tool python is missing version file in C:\Users\xxx\projects\IDEasy\software\python\.ide.software.version
Found 1 CVE(s) for version 3.14.6 of tool python:
CVE-2026-15308 with severity 7.5 and affected versions: [(,3.15.0)]
https://nvd.nist.gov/vuln/detail/CVE-2026-15308
Could not find any other version resolving your CVEs.
Please keep attention to this tool and consider updating as soon as security fixes are available.
Please note that by selecting an unsafe version to install, you accept the risk to be attacked.
Which version do you want to install?
Which version do you want to install?
Option 1: current (3.14.6 - unsafe)

No CVEs found for version 0.12.0 of tool uv.
Version 0.12.0 of tool uv is already installed
Version file missing at C:\Users\xxx\projects\IDEasy\software\python\.ide.software.version - restoring it for tool python
Successfully installed python in version 3.14.6 at C:\Users\xxx\projects\IDEasy\software\python
  1. Confirm that IDEasy restored $IDE_HOME/software/python/.ide.software.version.

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"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jul 27, 2026
@vivu001 vivu001 self-assigned this Jul 27, 2026
@vivu001 vivu001 added python runtime for python language install installation process of IDE + tools and install commandlet uv fast Python package and project manager labels Jul 27, 2026
@coveralls

coveralls commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 30344918220

Coverage increased (+0.03%) to 72.628%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

5 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/python/Python.java 4 84.48%
com/devonfw/tools/ide/version/VersionSegment.java 1 90.55%

Coverage Stats

Coverage Status
Relevant Lines: 17009
Covered Lines: 12879
Line Coverage: 75.72%
Relevant Branches: 7611
Covered Branches: 5002
Branch Coverage: 65.72%
Branches in Coverage %: Yes
Coverage Strength: 3.21 hits per line

💛 - Coveralls

@vivu001 vivu001 moved this from 🆕 New to 🏗 In progress in IDEasy board Jul 27, 2026
@vivu001
vivu001 marked this pull request as ready for review July 27, 2026 12:17
@vivu001 vivu001 moved this from 🏗 In progress to Team Review in IDEasy board Jul 27, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this is still in team-review, I should actually be patient but since I already had a look.
The bug comes from this location:

} else if (!isIgnoreMissingSoftwareVersionFile()) {
LOG.warn("Deleting corrupted installation at {}", installationPath);
fileAccess.delete(installationPath);
}

(you can easily use the GitHub search to find such code location from the log message).
You are not fixing this in your current PR.

@vivu001
vivu001 marked this pull request as draft July 29, 2026 06:52
@vivu001 vivu001 moved this from Team Review to 🏗 In progress in IDEasy board Jul 29, 2026
@vivu001 vivu001 closed this Jul 29, 2026
@vivu001
vivu001 force-pushed the feature/2190-fix-IDEasy-destroys-python-installation branch from 15cad77 to dd45e91 Compare July 29, 2026 13:23
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in IDEasy board Jul 29, 2026
@vivu001 vivu001 moved this from ✅ Done to 🏗 In progress in IDEasy board Jul 29, 2026
@vivu001 vivu001 reopened this Jul 29, 2026
@vivu001

vivu001 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Since this is still in team-review, I should actually be patient but since I already had a look. The bug comes from this location:

} else if (!isIgnoreMissingSoftwareVersionFile()) {
LOG.warn("Deleting corrupted installation at {}", installationPath);
fileAccess.delete(installationPath);
}

(you can easily use the GitHub search to find such code location from the log message).
You are not fixing this in your current PR.

@hohwille Thanks for the review. I investigated your suggestion, identified the root cause, and fixed the issue in the latest commit. I've also updated the problem analysis and the testing instructions above.

Please take another look and let me know your feedback. Sorry for the delayed update, and thanks again!

@vivu001
vivu001 marked this pull request as ready for review July 29, 2026 14:40
@vivu001 vivu001 moved this from 🏗 In progress to Team Review in IDEasy board Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

install installation process of IDE + tools and install commandlet python runtime for python language uv fast Python package and project manager

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

IDEasy destroys my python installation

4 participants