What's the difference between Chocolatey's Git packages?
Asked Answered
D

2

36

Chocolatey's package repository shows two popular packages for installing Git:

What's the difference between these two packages? How does one decide whether to use:

choco install git

or:

choco install git.install

Is one a superset of the other?

Dupery answered 5/2, 2015 at 21:56 Comment(1)
related question: https://mcmap.net/q/336738/-what-39-s-a-chocolatey-quot-install-quot-package/6908282Orthotropic
D
27

According to this forum thread the .install suffix is a discoverability artefact. Just use the shorter name:

choco install git
Dupery answered 6/2, 2015 at 0:0 Comment(2)
Rob's longer answer on the subject: devlicio.us/blogs/rob_reynolds/archive/2012/02/25/…Rodger
And that answer is now at ferventcoder.com/archive/2012/02/25/… (although some of the guidance is older).Glim
D
14

Straight from their FAQ page:

What is the difference between packages no suffix as compared to *.install *.portable?

What is the difference between packages named *.install (i. e. autohotkey.install), *.portable (i. e. autohotkey.portable) and * (i. e. autohotkey)?

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.

Hey, good question! You are paying attention! Chocolatey has the concept of virtual packages (coming, please see GitHub Issue) 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

Downwards answered 15/12, 2015 at 12:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.