docs icon indicating copy to clipboard operation
docs copied to clipboard

Package versions, bundled software, & uninstallers

Open vertigo220 opened this issue 6 years ago • 9 comments

I know we're not supposed to ask questions here, but I thought this was a more fitting place since I'm not just looking for answers, but I think the answers need to be in the wiki or even in Chocolately itself, so others can find them. I've searched high and low and haven't found any information (or, for the first question, any that made sense) on these things.

  1. Many packages have multiple different versions, i.e. (Install) / .install, (Portable) / .portable, and regular (no tag). Chocolately doesn't explain at all what the differences are, and the limited results I found that discuss it do nothing to clear up the issue. So for many of the programs I installed, I didn't know which version to use, and as a result I have no idea if I installed the right one. Could someone explain this in layman's terms?
  2. I couldn't find anything regarding whether any of the packages might contain bundled software (PUPs/adware/toolbars/etc). Considering some of the programs included in Chocolatey contain such crapware in at least some versions available for direct download, if Chocolately is using the same installers then it would be possible to get ones with this stuff, and since Chocolately installs are automated, you wouldn't be able to check for it or opt out.
  3. Does Chocolately just use the programs' uninstallers, no different than if you manually installed them then uninstalled them with Add/Remove Programs? Or does it work like Linux package managers, where it tracks everything done by the installer so it can do a more thorough job during the uninstall? IOW, is there any difference at all between uninstalling a program with Chocolately vs with Windows?

vertigo220 avatar May 10 '18 03:05 vertigo220

@vertigo220 let me see if I can help...

  1. Does this help to answer your question: https://chocolatey.org/docs/chocolatey-faqs#what-is-the-difference-between-packages-no-suffix-as-compared-to-install-portable
  2. Most of our community package maintainers go out of their way to ensure that crapware doesn't make it onto machines. There are a number of techiques that are used, for example, passing the required installation arguments to the native installer to prevent the installation, or pre-emptively creating registry keys that stop their installation. This isn't perfect, and it does rely on the community maintainers going that extra mile. What I will say, as one of the community repository maintainers is, if a package is found to be installing crapware, it would be removed from Chocolatey.
  3. When an application is installed through Chocolatey is does it's best to track the changes that are made to the system in terms of files placed on the file system, changes made to the registry, etc. These files are then used during the uninstallation as well.

gep13 avatar May 10 '18 09:05 gep13

  1. Unfortunately, no. I read that before when trying to figure it out, and didn't find it helpful. It talks about virtual and meta packages, but doesn't do much to explain what those actually mean and what the differences are. And it talks about dependencies, but at least to me it doesn't make it clear which type should be used in what cases. It's quite possible all the information is there but, at least to me, it doesn't seem to be laid out very clearly. A layman's/ELI5 explanation for it would really be helpful, and in my searching for answers about it I found others confused as well, so I'm clearly not the only one.
  2. Ok, I figured as much, but just wanted to be sure. Thanks!
  3. Good to know :)

vertigo220 avatar May 10 '18 18:05 vertigo220

@vertigo220 okay, so let's start here, and see if we can come up with something that helps to explain the concept, and we will see about getting it added.

Ok, so first up, let's think about a package like Git. Git comes in two forms.

The first (the .install) is an exe. When you install this, it adds an entry into Windows add/remove programs. The second (the .portable) is essentially a zip file, which means the files are extracted onto the file system, and Chocolatey works some magic to make sure that the main git.exe ends up on the Windows path so it can be used.

So, depending on your needs, you might be happy to install an application to add/remove programs, but you also might want to install something that doesn't require admin permissions. So, in theory, we could say to people either do choco install git.install or do choco install git.portable.

But, people expect to be able to simply do choco install git, and that is where the meta package and dependencies come in. You will notice that the main git package on chocolatey.org doesn't contain any files, i.e. no chocolateyInstall.ps1, etc. Instead, it takes a dependency on the git.install package. As a result, when you do choco install git what actually happens is that both the git and the git.install packages are installed, however, only one of them, the git.install actually does anything. The git package is the meta package. It is there to make is easier to find what packages are available to install. People expect to be able to do choco install git and this mechanism allows them to do it.

Does that make sense?

If so, could you read over the FAQ again, and help us make it better?

Thanks

gep13 avatar May 10 '18 18:05 gep13

  1. Does Chocolately just use the programs' uninstallers, no different than if you manually installed them then uninstalled them with Add/Remove Programs? Or does it work like Linux package managers, where it tracks everything done by the installer so it can do a more thorough job during the uninstall? IOW, is there any difference at all between uninstalling a program with Chocolately vs with Windows?

Not yet, but we are going to be doing more here - see chocolatey/choco#690

ferventcoder avatar May 10 '18 18:05 ferventcoder

Ok, first let me make sure I'm understanding it correctly. Essentially, if I specifically want the portable version, I use that, but if I want it installed normally, I can use either git or git.install. So in the CLI, I can do choco install git OR choco install git.install, though people either don't know or don't want to do the latter, hence the existence of just git (without the .install). So git is essentially a shortcut for git.install, and I have to do git.portable if I want the portable version.

So in the case of the GUI, if I search for git, and I get git, git.install, and git.portable, the first two do the exact same thing, just like with the CLI. So really I have two choices: git/git.install or git.portable, which are the "normal" choices for a program.

If that's all correct and I'm understanding it, it seems that an improvement for the GUI would be to simply show one of the non-portable (git/git.install) options (preferably the .install version so you don't have duplicate entries in your installed software list) since they're redundant and the purpose of the plain git is for the CLI. This would remove the source of confusion. As for the FAQ, I'd be happy to make a recommendation, I just want to make sure this is all right.

Instead of having a separate meta package, couldn't Chocolatey just be made to interpret git as git.install? Basically, if the argument doesn't end in .portable, append .install to it.

vertigo220 avatar May 10 '18 19:05 vertigo220

@vertigo220 said... So git is essentially a shortcut for git.install, and I have to do git.portable if I want the portable version.

Yes, essentially. The one caveat that I forgot to mention is there is a preference involved here. For example, let's say that most people used the portable version of git, rather than the installed version. There would be nothing to stop the package maintainer point the git package at git.portable (NOTE: This isn't how it is currently set up, but there is nothing to have stopped it being done that way).

@vertigo220 said... So really I have two choices: git/git.install or git.portable, which are the "normal" choices for a program.

Exactly.

@vertigo220 said... If that's all correct and I'm understanding it, it seems that an improvement for the GUI would be to simply show one of the non-portable (git/git.install)

Sounds like another issue for the GUI repository 😄

@vertigo220 said... As for the FAQ, I'd be happy to make a recommendation, I just want to make sure this is all right.

Feel free to send a PR through to here: https://github.com/chocolatey/choco-wiki/blob/master/ChocolateyFAQs.md to help improve this.

@vertigo220 said... Instead of having a separate meta package, couldn't Chocolatey just be made to interpret git as git.install? Basically, if the argument doesn't end in .portable, append .install to it.

Not quite as simple as that, as per my caveat above.

gep13 avatar May 10 '18 19:05 gep13

I just learned something regarding the package versions when setting up a computer, that I wanted to add here and that I feel should be added somewhere else easy to find to help users decide which to install. When installing a program using the generic package, instead of using the .install one, there were some that installed both the .install and .portable ones as a result. Because of that, I started using the .install when available, as well as going back and removing the ones I hadn't done that with and reinstalling them with the .install.

vertigo220 avatar Mar 17 '20 23:03 vertigo220

When installing a program using the generic package, instead of using the .install one, there were some that installed both the .install and .portable ones as a result.

Can't say that I have ever experienced this on any packages I have installed. Typically the meta-package should only have a dependency on either the .install or the .portable package. A meta-package installing both of them seems more likely to be a mistake by the maintainer. I could be wrong with that thought though.

AdmiringWorm avatar Apr 01 '20 10:04 AdmiringWorm

I think the docs can be improved in this area, so moving to the docs repository as this is where it will be covered.

gep13 avatar Jan 20 '22 20:01 gep13