Chocolatey-coreteampackages: cyg-get doesn't work with cygwin 2.5.0

Created on 14 Apr 2016  路  13Comments  路  Source: chocolatey-community/chocolatey-coreteampackages

With fresh install of version 2.5.0, the setup.exe installer does appear to be left anywhere (e.g. for use by cyg-get). The install runs fine, but afterwards there is no setup.exe in C:/tools/cygwin.

Most helpful comment

I found a workaround for this issue.

  1. Download the setup installer on the cygwin website: https://cygwin.com/setup-x86_64.exe or for 32bit: https://cygwin.com/setup-x86.exe
  2. Rename the installer to cygwinsetup.exe
  3. Move the installer to C:\tools\cygwin (or wherever you install cygwin)

Now cyg-get works fine.

edit: added the 32bit link, thanks @shabiel for posting it!

All 13 comments

I found a workaround for this issue.

  1. Download the setup installer on the cygwin website: https://cygwin.com/setup-x86_64.exe or for 32bit: https://cygwin.com/setup-x86.exe
  2. Rename the installer to cygwinsetup.exe
  3. Move the installer to C:\tools\cygwin (or wherever you install cygwin)

Now cyg-get works fine.

edit: added the 32bit link, thanks @shabiel for posting it!

BTW, if you installed the 32 bit Cygwin, the right set-up file is: https://cygwin.com/setup-x86.exe.

but afterwards there is no setup.exe in C:/tools/cygwin

I intentionally left this out, because chocolatey downloads the setup file to %TEMP% in the process of installing cygwin; why have the setup be downloaded twice and exist twice on the drive? I do not use cyg-get myself so I did not know I was breaking cyg-get at the time. However, I think the answer is to modify cyg-get such that it uses the setup file, with the correct name, in the appropriate location where it already exists (%TEMP%).

That being said, cyg-get is an odd tool, for its functionality already exists within cygwin setup and chocolatey. I don't know what purpose cyg-get serves.
I personally use the graphical interface provided by cygwin, which is readily called upon through chocolatey:

cinst cygwin -fy --not-silent

This simply runs the installer and can be used as many times as you want, not just to install cygwin for the first time. The installer is the package manager, after all.

Or, you can use installer arguments to stay within the cli, full documentation here https://cygwin.com/faq/faq.html#faq.setup.cli
The following example will install curl:

cinst cygwin -fy --installargs "-DdgP curl"

This can be simplified using aliases. You could even make your alias cyg-get if you like.

So you're recommending re-downloading the graphical installer every time we want to upgrade a package, rather than keeping it somewhere easily known (as opposed to a TEMP location, _designed_ to be periodically cleared out) for future package installs? This seems wasteful; copying the setup tool into the cygwin root folder, or possibly the bin directory seems an entirely reasonable thing to do. At the very least we could provide this as an _option_.

The cygwin setup.exe updates far more often than the chocolatey package, which only tracks the version of cygwin.dll. Redownloading that graphical installer periodically (a whopping 841KB) is a good thing.

I intentionally left this out, because chocolatey downloads the setup file to %TEMP% in the process of installing cygwin

I'm not very familiar with how chocolatey works, but keeping a file that might need to be used later in a temp directory doesn't sound like a good idea. As far as I can tell cyg-get needs to use setup.exe every time it runs.

why have the setup be downloaded twice and exist twice on the drive?

I certainly understand your logic here, perhaps we could create a symlink, that way there aren't 2 copies of the file, but cyg-get still knows where the file is?

That being said, cyg-get is an odd tool, for its functionality already exists within cygwin setup and chocolatey. I don't know what purpose cyg-get serves.

I had never heard of cyg-get before chocolatey, but I do like it since it's similar to package managers I'm used to in Linux. It does seem to do the same thing as the cygwin commands you mention, however on the official cygwin chocolatey page here it mentions that you can get better functionality with cyg-get. So it makes sense that people are going to try and use cyg-get over cygwin.

I am not an authority on this, and I have in fact since stopped using cygwin in favor of msys2, so I no longer have a horse in this race :)

Submit a PR with your changes- though keep in mind that the setup.exe is updated periodically. It might be wise to account for that, some how.

Perhaps setup.exe should be managed by a separate package, cygwin-setup?

I think in the cygwin package, we must build under cygwin-setup shim for the real location of the cygwin-setup! "point of interface" for cyg-get and other cygwin related packages. And in the cyg-get package to use only "shimed" cygwin-installer. cyg-get in this case will be able to work with different versions of cygwin, regardless of the location of the cygwin-setup.

We actually do have a PR here already, what's wrong with it?

@AndrewSav: #125 only fixes the issue for older installs. See the author's comment which says this issue (#200) is blocking it.

Seems like this is about to get fixed :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sc250024 picture sc250024  路  3Comments

kilasuit picture kilasuit  路  5Comments

Technetium1 picture Technetium1  路  4Comments

Foadsf picture Foadsf  路  4Comments

frankhalligan picture frankhalligan  路  4Comments