Live data from Hacker News

Chocolatey – package manager for Windows

chocolatey.org

1–10 of 39 posts

Re: Chocolatey – package manager for Windows

#2
I installed Chocolatey maybe a year ago, because of Atom for Windows. My recollection is that it was rather slow, shortcuts would sometimes break, and it was often unable to uninstall packages. Maybe package management is just hopeless for Windows.

Re: Chocolatey – package manager for Windows

#4
It's definitely not equivalent to "apt-get" -- I tried it out recently and it's a scripted installer for many things, but lacks a functional package manager backend like apt-get requires (dpkg, rpm for apt-rpm, etc).

Further, it doesn't have a repository of the packages themselves -- it tries to pull them from upstream, which sometimes means it will try to fetch a version that has been removed, moved, or is otherwise unavailable for reasons outside of the script's control and the people manually updating the database have not updated this packages URL. That is, without action this database will "rot" very quickly.

Because it lacks a functional package manager which understands that packages are just a collection of files on disk and plonks them down and instead tries to automate the install of every changing upstream package, which requires lots of testing. They seem to have automated test suites based on their webpage's green/red "dots" indicating a package passed/failed, however even installing software that was "passing" didn't always work for me.

Additionally, installing packages then tries to configure them based on command-line arguments... which are not the same for every package and are poorly documented for most packages...

A package manager can be made to work on Microsoft Windows, but this isn't "it" -- it might be an improvement. I haven't used Microsoft Windows in years and recently wanted to test out OpenSSH on Microsoft Windows (also terrible quality) so I tried Chocolatey and was quite disappointed.

The largest hurdle, I suspect, and the one that causes all of the design decisions in Chocolatey to be made the way they are is the prevalence of software with onerous distribution licensing such that they are not legally able to make a central repository under their control, and are not able to disassemble the installer packages and make sane packages with pre/post install scripts that operate consistently... But for something like OpenSSH it could have been made to work.

Re: Chocolatey – package manager for Windows

#5
I'm surprised to see this here, now.

Think carefully before using Chocolatey. It is not, never has been, and never will be the default package system for Windows. IMO the writing is on the wall as MS ships OneGet with Windows 10; while I think I read something about the projects working together, or OneGet supporting Chocolatey repositories or something, I don't believe OneGet's 'native format' will be Chocolatey packages.

On top of this, Chocolatey is based on v2 of NuGet, which is a) terrible and b) superseded by v3, which is the go-forward version that has a different package format and capabilities.

I am not sure why anyone would seriously consider using Chocolatey for a new project today.

Re: Chocolatey – package manager for Windows

#6
post #4

It's definitely not equivalent to "apt-get" -- I tried it out recently and it's a scripted installer for many things, but lacks a functional package manager backend like apt-get requires (dpkg, rpm for apt-rpm, etc). Further, it doesn't have a repository of the packages themselves -- it tries to pull them from upstream, which sometimes means it will try to fetch a version that has been removed, moved, or is otherwise…

Something that has more of a "true" package manager feel for windows is scoop: https://scoop.sh

It's not quite a full package manager either - but it works well enough, should be easy to add package/manifests for, and does allow one to update installed packages:

https://github.com/lukesampson/scoop/wiki/Chocolatey-Compari...

Re: Chocolatey – package manager for Windows

#7
I can't use Chocolately to install zlib or libpng or SDL or libcurl or GMP or really any of the packages that I would never have to think about installing on Linux, because they were pulled as dependencies long ago. The method for obtaining these on Windows is, as best as I have ever been able to tell, to navigate to each of their webpages and look for Windows releases, which you then download and install yourself, a task I find so daunting that I essentially never write or build programs that have any dependencies whatsoever on my Windows box. This situation is obviously ridiculous so I have to conclude I am doing something very, very wrong.

So, Windows programmers, how do get by without a package manager?

Re: Chocolatey – package manager for Windows

#8
post #4

It's definitely not equivalent to "apt-get" -- I tried it out recently and it's a scripted installer for many things, but lacks a functional package manager backend like apt-get requires (dpkg, rpm for apt-rpm, etc). Further, it doesn't have a repository of the packages themselves -- it tries to pull them from upstream, which sometimes means it will try to fetch a version that has been removed, moved, or is otherwise…

Chocolatey is basically a download manager like Ninite: http://ninite.com/

It is nothing like apt-get or yum for Linux. For example it does not fix broken packages and missing libraries and other things.

Chocolatley requires an admin shell and then powershell in order to install.

Re: Chocolatey – package manager for Windows

#9
post #2

I installed Chocolatey maybe a year ago, because of Atom for Windows. My recollection is that it was rather slow, shortcuts would sometimes break, and it was often unable to uninstall packages. Maybe package management is just hopeless for Windows.

You have to understand the basic differences between Windows and Linux. The way Libraries are installed in Windows is different from Linux. For one there is a registry in Windows and Linux stores things in directories and text files: http://superuser.com/questions/295635/linux-equivalent-of-wi...

Windows is closed source and changes how things work without informing others because some APIs are hidden. Linux is open source and they share all API calls and etc.

So there might not be an apt-get for Windows because of the way it is designed is different from that of Linux.

Re: Chocolatey – package manager for Windows

#10

I can't use Chocolately to install zlib or libpng or SDL or libcurl or GMP or really any of the packages that I would never have to think about installing on Linux, because they were pulled as dependencies long ago. The method for obtaining these on Windows is, as best as I have ever been able to tell, to navigate to each of their webpages and look for Windows releases, which you then download and install yourself, a…

In this example, you probably don't use zlib or libpng or SDL or libcurl or GMP. Your application targets a version of the .NET framework and you use System.IO.Compression, System.Windows.Media.Imaging, DirectX, and whatever the .NET equivalents are for your curl use case and GMP. You might use NuGet to find alternative packages to add to your solution - you are authoring in Visual Studio - for some or all of this. DirectX looks tricky.

Or, if you insist on writing 'unmanaged code,' you are probably finding similar capabilities in native libraries distributed with Windows; it's DirectX's natural environment. Otherwise, you're responsible for doing as you suggest: downloading/compiling the various libraries and stashing them in a nominated area for use by your build toolchain.

Also there's always msys2/mingw64, which does have a package manager (pacman I think?) and you woudl then distribute the necessary runtimes with your program.

Post reply on HN