Unable to install source packages when running setup from command line

Jon Turney jon.turney@dronecode.org.uk
Tue Mar 22 13:54:48 GMT 2022

On 20/03/2022 18:20, Adam Dinwoodie wrote:
> Hi,
> I *suspect* this is a bug, but it might just be this isn't supposed to
> work: there doesn't seem to be a way to download a source package for an
> already-installed Cygwin package when using setup from the command line.
> If I run, for example:
>      /bin/setup-x86_64.exe -d -l 'C:\Users\Adam\Downloads' -s http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/ -IP bash-completion -R 'C:\cygwin64'
> I'd expected this to select and automatically install the source package
> for bash-completion.  In fact, "bash-completion" does show up in the
> list of pending packages, but the "Src?" column is unchecked and greyed
> out; I can't even select it manually in the GUI selection tool.
> Unsurprisingly, when I continue through the installer, the source
> package doesn't get installed.  I see similar behaviour if -M or -q are
> also added to the argument list.
> Everything works as expected if I don't specify a package on the command
> line, and just select the source package from the GUI manually.  And
> while selecting a package that isn't currently installed seems to hit
> the same bug I've previously described with not showing up in the
> "Pending" list[0], it does successfully install both the requested
> package and the source package.
> I've attached the setup.log and setup.log.full files, in case they're
> useful for working out what's going wrong.

Yeah, this is a bug.

The design of '--include-source' is a bit weird, being "also install 
source for everything we are installing"  not "also install source of 
named packages" (so '-IP foo' does nothing if foo is already installed) 
(see [1])

As usual, PTC :)

[1] https://cygwin.com/pipermail/cygwin/2020-March/244099.html

More information about the Cygwin mailing list