Cygwin command line download issue

Jim Rather kaoscoach@hotmail.com
Wed Oct 23 15:33:00 GMT 2019


My script is not trying to "install" cygwin. I am trying to download packages so that I can install them on systems without internet connectivity. I added --root in my script but that didn't really help. I got a new etc directory but not much in it, just timestamp and setup.rc . I removed the --prune option in case that was affecting something but it still did not work as I was expecting.

I created a new directory, c:\Users\jrather\Documents\cygwin64. Edited my .bat file to only get Base and that seemed to work. My feeling is that I might be running into some sort of limitation on the length of my update command. So I broke the categories list out into a for loop.

This would be better if  there was a 'test' option in setup-x86_64.exe? Downloading 8.5 GB of files just to test this also seems to be overkill. In any case here is my new updated script which appears to work even though I am unsure of how to solve the initial problem.

@echo off
setlocal

set url=http://cygwin.com/setup-x86_64.exe
set cyg_dir=C:\Users\jrather\Documents\cygwin64
set cyg_setup=%cyg_dir%\setup-x86_64.exe

powershell -command "invoke-webrequest -uri %url% -outfile %cyg_setup%"

for %%i in (Admin,Archive,Base,Database,Editors,^
GNOME,Graphics,Interpreters,KDE,Libs,Lua,LXDE,^
Mail,MATE,Math,Net,Ocaml,Office,Perl,PHP,Publishing,^
Python,Ruby,Scheme,Science,Security,Shells,Sugar,^
System,Tcl,Text,Utils,Web,X11,Xfce) do (call :cyg "%%i")
goto :eof

:cyg
%cyg_setup% ^
 --arch x86_64 ^
 --categories %1 ^
 --delete-orphans ^
 --disable-buggy-antivirus ^
 --download ^
 --force-current ^
 --local-package-dir %cyg_dir% ^
 --no-admin ^
 --no-desktop ^
 --no-shortcuts ^
 --no-startmenu ^
 --no-version-check ^
 --only-site ^
 --prune-install ^
 --quiet-mode ^
 --remove-categories Accessibility,Audio,Debug,Devel,Doc,Games,Video ^
 --root %cyg_dir% ^
 --site http://mirrors.xmission.com/cygwin/ ^
 --verbose )

:eof
:end






________________________________
From: cygwin-owner@cygwin.com <cygwin-owner@cygwin.com> on behalf of Ken Brown <kbrown@cornell.edu>
Sent: Wednesday, October 23, 2019 8:34 AM
To: cygwin@cygwin.com <cygwin@cygwin.com>
Subject: Re: Cygwin command line download issue

On 10/22/2019 8:33 PM, Ken Brown wrote:
> [Please don't top-post on this list.]
>
> On 10/22/2019 3:42 PM, Jim Rather wrote:
>> I only get two lines in setup.log.full with regards to crypto-policies
>>
>> Found category Base in package crypto-policies
>> Added manual package crypto-policies
>
> setup.log.full contains information only about the most recent run of setup.
> That's why I suggested looking in both setup.log and setup.log.full.
>
>> I am confused, this script has worked faithfully for at least a year. I just emptied by %cyg_dir% and re-ran it. Afterwards, I am missing many basic packages like alternatives, bash, etc. so I am not sure what has changed and welcome any suggestions.
>
> Once again, setup.log and setup.log.full should provide some clues.

One other thing: I notice that your setup command line doesn't set the
installation root directory.  By default, setup will use whatever root it used
on its last run.  So if you previously used setup to install Cygwin, setup will
look at /etc/setup/installed.db to see what you have installed.  It won't
re-download the installed packages.

If you want to force download, I think you need to use --root to specify a
directory in which Cygwin is not already installed.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list