Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

choco list --local-only --all-versions --include-programs should note against multiple versions #24

Closed
ferventcoder opened this issue Jan 18, 2015 · 19 comments

Comments

@ferventcoder
Copy link
Member

Currently the output for all versions shows up correctly, but it doesn't use all versions to detect against the registry managed programs that choco has installed for all versions of a package.

PS C:\code\temp> choco list -lap
Chocolatey v0.0.1.0
chocolatey 0.0.1
ruby 1.8.7.37402
ruby 1.9.3.55100
ruby 2.0.0.59800
ruby 2.1.5
2 packages installed.

7-Zip 9.22 (x64 edition)|9.22.00.0
Bitvise SSH Server 5.60 (remove only)|
Git version 1.8.3-preview20130601|1.8.3-preview20130601
Notepad++|6.4.2
Oracle VM VirtualBox Guest Additions 4.3.12|4.3.12.0
Ruby 1.9.3-p551|1.9.3-p551
Ruby 2.0.0-p598-x64|2.0.0-p598
Ruby 2.1.5-p273-x64|2.1.5-p273
8 applications not managed with Chocolatey.

should be

PS C:\code\temp> choco list -lap
Chocolatey v0.0.1.0
chocolatey 0.0.1
ruby 1.8.7.37402
ruby 1.9.3.55100
ruby 2.0.0.59800
ruby 2.1.5
2 packages installed.

7-Zip 9.22 (x64 edition)|9.22.00.0
Bitvise SSH Server 5.60 (remove only)|
Git version 1.8.3-preview20130601|1.8.3-preview20130601
Notepad++|6.4.2
Oracle VM VirtualBox Guest Additions 4.3.12|4.3.12.0
5 applications not managed with Chocolatey.
@SyrianBallaS
Copy link

SyrianBallaS commented May 25, 2016

I can reproduce this issue by typing: "choco list -li".

The only "workaround" I could find is to completely uninstall using Revo Uninstaller, and reinstall with chocolatey. This is because sometimes packages that should be uninstalled are still there.

One more thing to add, apps like skype and the VS runtimes, or any software that has a different name than the package name will show up in the not managed part.

@ferventcoder
Copy link
Member Author

@SyrianBallaS what version of choco are you using?

@SyrianBallaS
Copy link

0.9.9.12

@ferventcoder
Copy link
Member Author

ferventcoder commented May 25, 2016

That's an interesting observation - the package name has nothing to do with the tracking of the actual software.

Follow the link:

image

Note the registry snapshot file:

https://gist.github.com/choco-bot/b309ca01ed32fcbb4e22f5c80b3728ef#file-1-registrysnapshot-xml

image

Name doesn't matter.

@ferventcoder
Copy link
Member Author

We talk more about tracking installed software and uninstalls, but it's probably best laid out in how AutoUninstaller works - https://chocolatey.org/docs/commands-uninstall

@ferventcoder
Copy link
Member Author

I'd suggest turning it on with choco feature enable -n autoUninstaller so that it will uninstall the applications when it uninstalls the packages.

@SyrianBallaS
Copy link

SyrianBallaS commented May 25, 2016

I already have that enabled, some packages do not get off the list even after uninstalling. aida64extreme 4.60.3100 for example.
image

And let me show you the skype:
It seems to have resolved itself, but similar to the OP, at in the Managed Packages part it would say:
skype 7.24.0.104

Unmanaged part:
SkypeT 7.24.0.104 | 7.24.0.104

Maybe I should enable the failOnAutoUninstaller as well.

@SyrianBallaS
Copy link

I'm actually quite interested in this project and wish to contribute. I love the efficiency of Linux but it's moderately tedious to work with. I find the simplicity of Windows w/ the efficiency of Linux quite fascinating.

Would be better to clone the repository directly or fork it over? I'm not quite sure how to make branches on projects not in my profile.

@ferventcoder
Copy link
Member Author

The problem you are describing is when there is no snapshot discovered when installing software, which happens if the registry does not change on install. It's harder for Chocolatey to track pre-existing software, especially if the uninstaller registry does not change.

@ferventcoder
Copy link
Member Author

we are getting better at MSI change tracking next version.

@ferventcoder
Copy link
Member Author

For contributing - you would want to fork so you have a remote repository you can push to to provide Pull Requests. We have a pretty good write up in CONTRIBUTING.md in the base of the repo - https://github.com/chocolatey/choco/blob/master/CONTRIBUTING.md

It has some very detailed expectations related to git and commits. I would definitely read that through. 👍

@jzabroski
Copy link

jzabroski commented Nov 20, 2018

The following hangs on my machine:

PS C:\WINDOWS\system32> choco.exe list --localy-only --all-versions --include-programs
Chocolatey v0.10.7

Edit: After awhile, it returned the following weird error for --local-only flag!

[NuGet] Could not connect to the feed specified at 'https://chocolatey.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
0 packages found.

Did you know Pro / Business automatically syncs with Programs and
 Features? Learn more about Package Synchronizer at
 https://chocolatey.org/compare

@bcurran3
Copy link

bcurran3 commented Nov 20, 2018

@jzabroski You're getting hit by the problem with the chocolatey.org caching controller. I just did a search for packages on the page - 1st time showed results 2nd time showed 0 packages.

This is a chocolatey.org problem. You should inform the powers that be in the Chocolatey Google Groups or on the Chocolatey Gitter channel (best).

https://groups.google.com/forum/#!forum/chocolatey
https://gitter.im/chocolatey/choco
https://status.chocolatey.org/

@jzabroski
Copy link

@bcurran3 I think you're literally not seeing what I'm seeing. Why on God's green earth is --local-only doing an HTTP call??

@jzabroski
Copy link

Looks like upgrading to v0.10.11 fixed the problem for me... I'll try to dig into why --local-only is so insane and see if it still is insane on v0.10.11

@bcurran3
Copy link

bcurran3 commented Nov 20, 2018

@jzabroski - You typo-ed.

choco.exe list --**localy-only** --all-versions --include-programs

"localy" will give you the error you pasted as it's not a valid switch and (seemingly ignored?) goes out to https://chocolatey.org/api/v2/ to get a list of all packages in community repository feed (which is currently having caching problems).

When you retried after your upgrade, you didn't do the typo and all worked as supposed and your expectations. :)

@datocrats-org
Copy link

One thing I noticed with was when I ran the choco list -lai shorthand of the command in a non-admin powershell prompt, I get a low number of packages managed by chocolatey sometimes. As soon as I rerun the same command as an admin powershell prompt, the strangely shorter list of chocolatey managed packages goes away on the non-admin prompt.

I can't remember exactly the output the first time through, I think it included just the base chocolatey packages, dotnet, and WSL related packages.

chocolatey 0.10.15
chocolatey-core.extension 1.3.5.1
chocolatey-dotnetfx.extension 1.0.1
chocolatey-windowsupdate.extension 1.0.4
DotNet4.5 4.5.20120822
DotNet4.5.2 4.5.2.20140902
dotnet4.6.2 4.6.01590.20190822
dotnetfx 4.8.0.20190930
wsl2 2.0.0.20210721
wsl-ubuntu-2004 20.4.0.20200912

@TheCakeIsNaOH
Copy link
Member

I am unable to reproduce this with a build from the latest develop. I installed multiple versions of ruby.install side by side:

\src\chocolatey.console\bin\Debug\choco.exe install ruby.install --version=2.5.9.1 --allow-multiple
\src\chocolatey.console\bin\Debug\choco.exe install ruby.install --version=2.6.10.1 --allow-multiple
\src\chocolatey.console\bin\Debug\choco.exe install ruby.install --version=2.7.6.1 --allow-multiple
\src\chocolatey.console\bin\Debug\choco.exe install ruby.install --version=3.0.4.1 --allow-multiple
\src\chocolatey.console\bin\Debug\choco.exe install ruby.install --version=3.1.2.1

But when I ran \src\chocolatey.console\bin\Debug\choco.exe list --local-only --all-versions --include-programs, none of the ruby installs showed up in the applications not managed by Chocolatey, so multiple versions are noted correctly.

@TheCakeIsNaOH
Copy link
Member

TheCakeIsNaOH commented Nov 1, 2022

As this has not been able to be reproduced with the current version of Chocolatey, and side by side installs are deprecated, this issue can be closed. #2787

@TheCakeIsNaOH TheCakeIsNaOH closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2022
@TheCakeIsNaOH TheCakeIsNaOH removed this from the 1.x milestone Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants