chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.33k stars 903 forks source link

chocolatey-core.extension gets uninstalled with choco uninstall -x #3341

Closed joel-schaal closed 10 months ago

joel-schaal commented 1 year ago

Checklist

What You Are Seeing?

When I perform choco uninstall -x -y 7zip (7zip is listed as an example, many nuggets have the same result) the dependency chocolatey-core.extension is removed too, even though it is something provided with chocolatey itself.

Even if I pin chocolatey-core.extension , it is still removed (as well as the pin)

What is Expected?

Core dependencies should not be removed when we remove the dependencies of a nugget

How Did You Get This To Happen?

  1. choco install -y 7zip
  2. choco uninstall -x -y 7zip

System Details

Installed Packages

PS C:\Users\DWOS> choco list
Chocolatey v2.1.0
Boxstarter 3.0.0
Boxstarter.Bootstrapper 3.0.0
Boxstarter.Chocolatey 3.0.0
Boxstarter.Common 3.0.0
Boxstarter.HyperV 3.0.0
Boxstarter.WinConfig 3.0.0
chocolatey 2.1.0
DotNet3.5 3.5.20160716
dw-commons.extension 1.0.0
dw-hwmonitor 1.52.0
dw-scriptinstall 1.0.2
hwmonitor 1.52.0.20230901
intel-burn-test 3.2.0
intellijidea-ultimate 2022.3.1
maven 3.9.4
probe-control-center 1.0.0

Output Log

"There was an error creating your issue: body is too long (maximum is 65536 characters)."

Additional Context

No response

AdmiringWorm commented 1 year ago

@joel-schaal as the issue template mentioned, we need all the information from the output log, and if you could not include it in the issue itself upload this information to https://gist.github.com/ and link to it in the output log section.

Can you please do this, and update the initial issue with the link to this gist?

joel-schaal commented 11 months ago

I reset my setup and removed my previous log file. I have done the steps I mentioned again and this is what happened: chocolatey.log

pauby commented 11 months ago

The version of Chocolatey CLI in the logs is not supported for open source. Can you upgrade to the latest 2.2.2 version and reproduce it and provide updated logs?

joel-schaal commented 11 months ago

I updated chocolatey to 2.2.2 and reperformed the commands, the problem is still there. The logs look quite the same: chocolatey.log

steviecoaster commented 11 months ago

@joel-schaal I believe this is expected behavior. Thechocolatey-core.extension is not provided as a part of Chocolatey.

when you Installed the 7zip the following happend:

7zip evaluated that it needed the 7zip.install dependent package. The 7zip.install package in turn took a dependency on chocolatey-core.extension, and the chocolatey-core.extension package itself took a dependency on chocolatey-compatibility.extension. After everything was said and done Chocolatey had installed the following packages to satisfy the entire dependency tree along with the package you requested:

When you issued the -x parameter on your install command you explicity told Chocolatey to Uninstall dependencies when uninstalling package, according to the help.

The portion of this that may need evaluated as a bug is when you say: Even if I pin chocolatey-core.extension , it is still removed (as well as the pin). I believe that may be unexpected behavior. But if the pinning of packages is not in play, I believe Chocolatey CLI is behaving as intended.

github-actions[bot] commented 10 months ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue will be closed in 14 days if it continues to be inactive.

github-actions[bot] commented 10 months ago

Dear contributor,

As this issue seems to have been inactive for quite some time now, it has been automatically closed. If you feel this is a valid issue, please feel free to re-open the issue if / when a pull request has been added. Thank you for your contribution.