public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygwin does not run quietly if --quiet-mode given on commandline
@ 2023-03-30 14:23 Thomas Schweikle
  2023-03-30 16:24 ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schweikle @ 2023-03-30 14:23 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 792 bytes --]

Hi!

starting cygwin setup-x86_64.exe with parameters:

setup-x86_64.exe ^
   --verbose ^
   --delete-orphans ^
   --local-package-dir "C:\WINDOWS\ccmcache\4r\installdata" ^
   --no-desktop ^
   --proxy "<proxy-host:proxy-port>" ^
   --root "C:\cygwin" ^
   --upgrade-also ^
   --quiet-mode ^
   --wait

It does not matter if "--quiet-mode" is given or not: in all cases 
cygwin setup opens a window showing setup progress and the real bad 
thing: allows the user on whom desktop the window is shown to stop the 
upgrade!

I need a really unattended upgrade with some log written what setup had 
done.

And is it a bug? As far as I could find "--quiet-mode" means no window, 
no messages at all - am I wrong and all those interpreting it the same way?
-- 
Thomas


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2521 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygwin does not run quietly if --quiet-mode given on commandline
  2023-03-30 14:23 cygwin does not run quietly if --quiet-mode given on commandline Thomas Schweikle
@ 2023-03-30 16:24 ` Brian Inglis
  2023-03-30 19:00   ` Thomas Schweikle
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Inglis @ 2023-03-30 16:24 UTC (permalink / raw)
  To: cygwin

On 2023-03-30 08:23, Thomas Schweikle via Cygwin wrote:
> starting cygwin setup-x86_64.exe with parameters:
> setup-x86_64.exe ^
>    --verbose ^
>    --delete-orphans ^
>    --local-package-dir "C:\WINDOWS\ccmcache\4r\installdata" ^
>    --no-desktop ^
>    --proxy "<proxy-host:proxy-port>" ^
>    --root "C:\cygwin" ^
>    --upgrade-also ^
>    --quiet-mode ^
>    --wait
> It does not matter if "--quiet-mode" is given or not: in all cases cygwin setup 
> opens a window showing setup progress and the real bad thing: allows the user on 
> whom desktop the window is shown to stop the upgrade!
> I need a really unattended upgrade with some log written what setup had done.
> And is it a bug? As far as I could find "--quiet-mode" means no window, no 
> messages at all - am I wrong and all those interpreting it the same way?

Might want to try dropping:

 >    --verbose ^
 >    --delete-orphans ^
 >    --wait

and add -O|--only-site -s|--site /url/ -s|--site ... closest/fastest mirrors as 
long as it is/they are active in https://cygwin.com/mirrors.lst - probably best 
if they are different protocols at the same mirror (handles cert expiry) and/or 
reliable backup.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cygwin does not run quietly if --quiet-mode given on commandline
  2023-03-30 16:24 ` Brian Inglis
@ 2023-03-30 19:00   ` Thomas Schweikle
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Schweikle @ 2023-03-30 19:00 UTC (permalink / raw)
  To: Brian Inglis via Cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 3807 bytes --]



Am Do., 30.März.2023 um 18:24:20 schrieb Brian Inglis via Cygwin:
> On 2023-03-30 08:23, Thomas Schweikle via Cygwin wrote:
>> starting cygwin setup-x86_64.exe with parameters:
>> setup-x86_64.exe ^
>>    --verbose ^
>>    --delete-orphans ^
>>    --local-package-dir "C:\WINDOWS\ccmcache\4r\installdata" ^
>>    --no-desktop ^
>>    --proxy "<proxy-host:proxy-port>" ^
>>    --root "C:\cygwin" ^
>>    --upgrade-also ^
>>    --quiet-mode ^
>>    --wait
>> It does not matter if "--quiet-mode" is given or not: in all cases 
>> cygwin setup opens a window showing setup progress and the real bad 
>> thing: allows the user on whom desktop the window is shown to stop the 
>> upgrade!
>> I need a really unattended upgrade with some log written what setup 
>> had done.
>> And is it a bug? As far as I could find "--quiet-mode" means no 
>> window, no messages at all - am I wrong and all those interpreting it 
>> the same way?
> 
> Might want to try dropping:
> 
>  >    --verbose ^
>  >    --delete-orphans ^
>  >    --wait

If i drop "--verbose" it only does less output to console.

"--delete-orphans" is supposed to delete packages not found on servers 
any more. It is sometimes needed to have setup update cygwin without 
hassles. But I am aware of it removing more than necessary sometimes.

"--wait" is necessary. If it is not given, setup will immediate return, 
triggering following routines -- bad if some rely on cygwin upgraded and 
functional.

What I found after trying: the only way is to make this setup window 
hidden. It is opened in all cases. It is opened even before given 
options are evaluated. Thus "--quiet" is nearly useless: the window is 
open before setup evaluates not to open a window.

I was able to get what i wanted mostly with:

$SetupOpts = @{
     FilePath = $isf
     ArgumentList = @(
         "--verbose",
         "--delete-orphans",
         "--upgrade-also",
         "--quiet-mode",
         "--wait",
         "--no-desktop",
         "--local-package-dir", "`"C:\WINDOWS\ccmcache\4r\installdata`"",
         "--proxy", "`"<proxy-host:proxy-port>`"",
         "--root", "`"C:\cygwin`""
     )
     WindowStyle = "Hidden"
     PassThru = $True
     Wait = $True
     RedirectStandardOutput = "$isl"
     RedirectStandardError = "$ise"
}
$proc = Start-Process @SetupOpts

It behaves slightly different if "--wait" is only flagged for setup and 
not the calling process "Wait = $True". If "--wait" is given, but not 
"Wait = $True" it returns before final cleanup is done (PowerShell calls 
a hidden cmd.exe, which in tune calls setup-x86_64.exe). In case both 
waits are given it returns after everything is done.

If only "Wait = $True" was given it returns nearly immediately -- setup 
has not finished then.


or, from cmd.exe

setup-x86_64.exe ^
   --verbose ^
   --delete-orphans ^
   --local-package-dir "C:\WINDOWS\ccmcache\4r\installdata" ^
   --no-desktop ^
   --proxy "<proxy-host:proxy-port>" ^
   --package-manager ^
   --root "C:\cygwin" ^
   --upgrade-also ^
   --wait

> and add -O|--only-site -s|--site /url/ -s|--site ... closest/fastest 

Found this only a good idea if mirrors where reliable. But they are not. 
If one goes down you'll need a backup. Or you've got your own local 
mirror. Not too difficult to set up, but takes a lot of storage. Maybe 
in near future.

It is way to often the selected mirror is out of order. Giving --site or 
--only-site is then a point upgrades/installs fail.

> mirrors as long as it is/they are active in 
> https://cygwin.com/mirrors.lst - probably best if they are different 
> protocols at the same mirror (handles cert expiry) and/or reliable backup.
-- 
Thomas


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2521 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-30 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 14:23 cygwin does not run quietly if --quiet-mode given on commandline Thomas Schweikle
2023-03-30 16:24 ` Brian Inglis
2023-03-30 19:00   ` Thomas Schweikle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).