50

On reviewing the chocolatey packages available, I came across a few that have two (or sometimes more) packages apparently for the same product. At first glance is not possible to tell the difference.

For example, there is the AutohotKey package, and then there is also an Autohotkey.install package.

What is the difference between both types of packages?

Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
j4v1
  • 1,457
  • 1
  • 22
  • 32

2 Answers2

33

Have a look at the FAQ in the Chocolatey wiki here:

https://docs.chocolatey.org/en-us/faqs#what-is-the-difference-between-packages-no-suffix-as-compared-to.install.portable

Quoting from that article:

tl;dr: Nearly 100% of the time, the package with no suffix (autohotkey in this example) is going to ensure the *.install. The package without the suffix is for both discoverability and for other packages to take a dependency on.

Chocolatey has the concept of virtual packages (coming) and meta packages. Virtual packages are packages that represent other packages when used as a dependency. Metapackages are packages that only exist to provide a grouping of dependencies.

A package with no suffix that is surrounded by packages with suffixes is to provide a virtual package. So in the case of git, git.install, and git.commandline (deprecated for .portable) – git is that virtual package (currently it is really just a metapackage until the virtual packages feature is complete). That means that other packages could depend on it and you could have either git.install or git.portable installed and you would meet the dependency of having git installed. That keeps Chocolatey from trying to install something that already meets the dependency requirement for a package.

Talking specifically about the *.install package suffix – those are for the packages that have a native installer that they have bundled or they download and run.

NOTE: the suffix *.app has been used previously to mean the same as *.install. But the *.app suffix is now deprecated and should not be used for new packages.

The *.portable packages are the packages that will usually result in an executable on your path somewhere but do not get installed onto the system (Add/Remove Programs). Previously the suffixes *.tool and *.commandline have been used to refer to the same type of packages.

NOTE: now *.tool and *.commandline are deprecated and should not be used for new packages.

Want more information? See http://ferventcoder.com/archive/2012/02/25/chocolatey---guidance-on-packaging-apps-with-both-an-install.aspx

Todd Ropog
  • 1,133
  • 1
  • 14
  • 23
Gary Ewan Park
  • 17,610
  • 5
  • 42
  • 60
  • So what should be installed, what is the difference on the system? – Kalaschnik Sep 18 '19 at 07:09
  • You can install either. i.e. if you use the command choco install 7zip, then both the 7zip and the 7zip.install packages will be added to your machine. If you type the command choco install 7zip.install, only the install package will be added. At the command line, it is easier to type the first command. In a scripted environment, I would likely use the latter command. – Gary Ewan Park Sep 18 '19 at 07:40
  • 4
    I don't clearly understand the explanation. So If I would like to install any app - does this mean I don't have to worry about the one with `(install)` as suffix? – Gangula Oct 20 '21 at 18:29
1

Setting up a new environment with choco recently and became curious about this too. Chocolatey seemingly created a dedicated documentation site and moved the FAQs there, updating link to:

https://docs.chocolatey.org/en-us/faqs#what-is-the-difference-between-packages-no-suffix-as-compared-to.install.portable

James
  • 11
  • 1