Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cygwin - Installing a specific package version using the commandline installer

Tags:

cygwin

Using the commandline installer, one can easily install Cygwin with a list of wanted packages like so

setup-x86.exe -q -p='tar,sed,<more packages>'

Is it also possible to fix the version of the packages, something like

setup-x86.exe -q -p='tar:1.2.3,sed,<more packages>'

(this obviously doesn't work)?

like image 849
helpermethod Avatar asked Sep 18 '14 12:09

helpermethod


People also ask

Where are packages installed in Cygwin?

Information on installed packages is kept in the /etc/setup/ directory of your Cygwin installation; if setup.exe cannot find this directory it will act as if you have no Cygwin installation. If setup.exe finds a newer version of an installed package available, it will automatically mark it to be upgraded.

Should I install all Cygwin packages?

You can always install any package you want after you've installed Cygwin. There is no need to install them all at once go. i'm sure most people(apart from the OP perhaps) are aware that you can do it very manually what you call 'doing the effort' and while you say about backing it up you don't state how.


1 Answers

The short answer to your query is, No. Cygwin's setup -x86.exe does not give you the flexibility to specify version names along with package names. As per the official doc :

The basic reason for not having a more full-featured package manager is that such a program would need full access to all of Cygwin's POSIX functionality. That is, however, difficult to provide in a Cygwin-free environment, such as exists on first installation. Additionally, Windows does not easily allow overwriting of in-use executables so installing a new version of the Cygwin DLL while a package manager is using the DLL is problematic

There are however a couple of workarounds if you want to download a specific package:

  1. Locate a cygwin mirror that hosts the specific version. Google for your version, and if you find a mirror hosting that version, simply use that mirror before running setup -x86.exe. [source]
  2. Maintain a local pacakge repository and use the commandline options -q -L -l x:\cygwin-local\, where your downloaded package tree is in x:\cygwin-local\ [source] . You can learn how to build and maitain packages here
  3. Compile and install the package after you've set up cygwin using make.
like image 147
Abhishek Pathak Avatar answered Dec 31 '22 05:12

Abhishek Pathak