delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/07/03/13:55:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:reply-to:to:message-id
:subject:mime-version:content-type:content-transfer-encoding
:references; q=dns; s=default; b=RZS6y1KzwGhezmznODtVkDLrjECm8X/
kFmkEo10woIwirSrV1vFggsO08c41G2rvxedEIbMX9yVYAkIc4sBdeNMc63O8xuz
z4c2aWVXBNrmYemSeotK+wQVWKUp9t8u7Tk5B0miZlCExXHRs9h41c6XZoiaPlis
Sm/4ji+JDUn0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:reply-to:to:message-id
:subject:mime-version:content-type:content-transfer-encoding
:references; s=default; bh=ZAknaF6E9ZliXI8A8gLhzdvrRiQ=; b=aZbhi
1cnTV8nsmSmr1AMZSVWGAoaaUg6H8Fd8gu9gULMMm5GTg2udoiHSaK8NLkbEaYMh
Pk4E1Ms5ji9UveV3Nj1lkxNr9X6pZP//fIH7MTzfn3exP9TUKYxi5hTewqj1MyJO
dlDAhq/ULpzXqc/8hcmk8pMs6uDcTMEKg7EON0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=serious, Installation, H*x:20100101, H*UA:Firefox
X-HELO: sonic310-13.consmr.mail.ir2.yahoo.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1530640518; bh=4FNBU6R+6s/r0qaI3Ns96uJJsFHP3lPv8dHch3+IBc8=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=Dz0cLmtGv/TvIq1qeKaeJL6LL8vjdyiIaI9J1wrMjcCc7bNp0qydyXDjBoE6hcR7TPupijipogW0Zb95h4N/QMVCxS2Vn4Pwx2Xv+Hu9ZYsutLP8rIzNoVhTh8KxcYY7Ks7p5O5/c2BPcLKpdHFRCKk72f3vtUEDY5TFODKxU96ke1uZRJtwTA4JwGYIqUszzAIhjsmuf52RXLJpZCsjVf47i0MGQN5C/CtWpRz0wJ8VDnmH3PToMV/fKpYzBofe/N1jTXxyYdkEuXw9qzoDcikBQFS/YhDqIvdd6Ugny4XZgpNGssP65GOlaPB+nSwC1rGpq+ae6zrNPZpfdWgLow==
Date: Tue, 3 Jul 2018 17:55:12 +0000 (UTC)
From: "R. Diez via cygwin" <cygwin AT cygwin DOT com>
Reply-To: "R. Diez" <rdiezmail-cygwin AT yahoo DOT de>
Reply-To: "R. Diez" <rdiezmail-cygwin AT yahoo DOT de>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-ID: <693796192.3838665.1530640512441@mail.yahoo.com>
Subject: Unattended upgrade does not report errors via the exit code
MIME-Version: 1.0
References: <693796192 DOT 3838665 DOT 1530640512441 DOT ref AT mail DOT yahoo DOT com>

Hi all:

First of all, many thanks for Cygwin.

I have been trying to find out how to do an unattended update/upgrade of all packages, in order to save some mouse clicks. To do that, you start 
setup-x86_64.exe with --quiet-mode. During experimentation, I found out the following:

1) Apparently, it will close all running Cygwin software automatically as needed, in order to upgrade it. That may be a nasty surprise for the unwary.


2) If you start it from a Cygwin console, or from an unprivileged Windows console, you will not see the console messages like this:


Starting cygwin install, version 2.891
User has backup/restore rights

Current Directory: C:\CygwinInstall
Could not open service McShield for query, start and stop. McAfee may not be installed, or we don't have access.
root: C:\cygwin64 system
Selected local directory: C:\CygwinInstall
net: Direct
connection error: 12007
site: http://linux.rz.ruhr-uni-bochum.de/download/cygwin/
connection error: 12007
connection error: 12007
...

If you run it from a unprivileged console, you will not see the message either that tells you about the log file where to look for errors.


I would suggest documenting those things. I could not find mention of that anywhere in the web pages.

More seriously, the setup program does not indicate any failure (it always yields an exit code of 0). In the above example, where I disabled the network card, you get the following lines at the end:

connection error: 12007
connection error: 12007
mbox note: Unable to get setup from <http://linux.rz.ruhr-uni-bochum.de/download/cygwin/>
unattended_mode is set at mbox: returning default value
download/verify error in unattended_mode: out of retries
note: Installation incomplete.  Check C:\cygwin64\var\log\setup.log.full for details
Ending cygwin install



I tried printing $? from a Cygwin shell afterwards, and %ERRORLEVEL% in a Windows console, and it always showed an exit status of 0.


I did not try what happens if the selected mirror is out of date.

This is a serious drawback, because there is no way to know whether the unattended install or upgrade failed or not.

Best regards,
  rdiez

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019