1

I have a software with v1.0 installed with chocolatey. I want to keep that version but want chocolatey to install v2.0 also (next to the older one) when I do the next choco update all.

Is:

choco pin add -n=<softname> --version=<1.0>

and:

choco install <softname>

enough? Did I miss something? Is there another way to do this?

EDIT.: as user @Seth noted, yes the software allows multiple installations.

2
  • Does the software support concurrent installations in the first place?
    – Seth
    Commented May 15, 2019 at 9:50
  • yeah, I forgot to mention it. It allows that. Commented May 15, 2019 at 10:41

1 Answer 1

2

In package management, you should have one version of a piece of software installed. If the underlying software supports multiple versions, what you are looking to do is create a package id per something about the version that is your breaking areas.

PREFERRED: A Package Id Per Some Part of The Version (Major, Major Minor, etc)

Aka ruby1.9, ruby2.0, ruby2.x. If you are talking about .NET Framework, that is a package ID per full version as the software sits side by side.

This allows you to have a nice upgrade path for all of those versions and it is completely compatible with all integrations you might use with Chocolatey.

NOT RECOMMENDED: Side By Side Installation

There is also a way to run multiple package installations and track multiple versions of a single package id, but it doesn't support upgrade and it is not able to be used with configuration management, so it's not something we would recommend. However I don't know your constraints, so if you do need to do this, you would run choco install with --allow-multiple-versions. From the documentation:

-m, --sxs, --sidebyside, --side-by-side, --allowmultiple, --allow-multiple, --allowmultipleversions, --allow-multiple-versions
     AllowMultipleVersions - Should multiple versions of a package be
       installed? Defaults to false. 
4
  • And how do you do the preferred way? Commented May 16, 2019 at 15:37
  • @40detectives Well, I guess I don't know what might be preferred for you. However I created Chocolatey and am still the primary maintainer, plus I have years of seeing it used in hundreds of organizations, so I might have an idea. Commented May 21, 2019 at 3:30
  • Sorry, I guess I did not explain myself correctly. I meant: How do you achieve the "A package Id Per Some Part of The Version" way? Does it depend on whether there are different packages being maintained for each version? Commented May 22, 2019 at 15:35
  • 1
    It depends more on the software. Ruby is typically major.minor, where .net framework is major.minor.path version segments making up the name of the package. You would create these packages yourself typically unless they were already available from the community repository in that way. So you would create a package called "software1.x" and another package called "software2.x" and you would put versions of each of them out into your repository. Then you can have them installed next to each other as they have two separate ids. Commented May 22, 2019 at 21:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .