search and install packages via bash?

Ulli Horlacher framstag@rus.uni-stuttgart.de
Thu Jul 8 13:53:24 GMT 2021


On Thu 2021-07-08 (13:13), Jon Turney wrote:
> On 08/07/2021 09:45, Ulli Horlacher wrote:
> 
> > Is it possible from an interactive bash to search for cygwin packages (by
> > substring match) and install them?
> > 
> > I tried "/setup-x86_64.exe -h" but cannot see any options for it.
> 
> This feature doesn't exist (yet).
> 
> You could possibly build something equivalent using 'cygcheck -p' and 
> then processing it's output

This is the easy part, but how do I install a package via bash?
I tried it this way:


W10dev:/usr/local: /setup-x86_64.exe  -M -B -R "$CYGWIN_ROOT" -l "$CYGWIN_ROOT/.pkg-cache" -s https://ftp.fau.de/cygwin -P mksh
Starting cygwin install, version 2.908
User has NO backup/restore rights
io_stream_cygfile: fopen(/etc/setup/setup.rc) failed 2 No such file or directory
Current Directory: C:\Users\admin\cygwin/.pkg-cache
root: C:\Users\admin\cygwin user
Selected local directory: C:\Users\admin\cygwin/.pkg-cache
net: Preconfig
site: https://ftp.fau.de/cygwin/


But got "Nothing to install or update"

https://fex.flupp.org/fop/nbVoB9kQ/X-20210708155136.png


The fopen() error is mysterious for me, too:

W10dev:/usr/local: ll /etc/setup/setup.rc
-rw-r--r-- admin None 11,850 2021-07-08 15:36:54 /etc/setup/setup.rc

W10dev:/usr/local: id
uid=1001(admin) gid=197121(None) groups=197121(None),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This Organization),113(Local account),4095(CurrentSession),66048(LOCAL),262154(NTLM Authentication),401408(Medium Mandatory Level)

W10dev:/usr/local: head -2 /etc/setup/setup.rc
last-cache
        C:\Users\admin\cygwin/.pkg-cache


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<bf14fb2b-ddf5-8618-0da3-9ea5531c5877@dronecode.org.uk>


More information about the Cygwin mailing list