X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 801AD3858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney AT btinternet DOT com; bimi=skipped X-SNCR-Rigid: 6139417C13B2A986 X-Originating-IP: [213.120.30.10] X-OWM-Source-IP: 213.120.30.10 (GB) X-OWM-Env-Sender: jonturney AT btinternet DOT com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvvddrgeefgdelfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepheduueevueejueejgeeufeehtddtkeevtdduieelfeetteeffeejjedukeefgffgnecuffhomhgrihhnpegthihgfihinhdrtghomhenucfkphepvddufedruddvtddrfedtrddutdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtfegnpdhinhgvthepvddufedruddvtddrfedtrddutddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheprggurghmseguihhnfihoohguihgvrdhorhhgpdhrtghpthhtoheptgihghifihhnsegthihgfihinhdrtghomh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Message-ID: Date: Tue, 1 Feb 2022 16:53:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: setup-*.exe --help default explanation re -D/-L options [Was: [ANNOUNCEMENT] Updated: setup (2.917)] Content-Language: en-GB To: Adam Dinwoodie , The Cygwin Mailing List References: <20220131221159 DOT 3hcw3xxcwje6sahf AT lucy DOT dinwoodie DOT org> From: Jon Turney In-Reply-To: <20220131221159.3hcw3xxcwje6sahf@lucy.dinwoodie.org> X-Spam-Status: No, score=-3567.7 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPAM_BODY, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On 31/01/2022 22:11, Adam Dinwoodie wrote: > On Mon, 31 Jan 2022 12:56:13 -0700, Brian Inglis wrote: >> On 2022-01-31 08:46, Andrey Repin wrote: >>> Greetings, Jon Turney! >>> >>>> Probably what's wanted is to remember the state of those checkboxes, if >>>> this isn't the first time setup has been run? >>> >>> That's a feature silently longed for for a loong time. :) But this is such a >>> low priority, very few people actually mentioned it in the past years. >> >> It could usefully be added similarly to last-action: >> >> $ fgrep -A1 action /etc/setup/setup.rc >> last-action >> Download,Install >> >> last-shortcut: >> Desktop|StartMenu|none,... > > This reminded me of a bug report I've been meaning to properly > characterise and report for a while, and also pointed me at a > workaround... > > Currently, running `setup-*.exe --help` produces output that includes > the following: > > -D --download Download packages from internet only > -L --local-install Install packages from local directory only > > The default is to both download and install packages, unless either > --download or --local-install is specified. > > I think the descriptions for the `-D` and `-L` options are misleading, > at least in combination with that final line, which is definitely wrong. > As I understand it, the actual behaviour would be better described by > something like the below: > > -D --download Download packages from internet only, unless -L > is also specified > -L --local-install Install packages from local directory only, > unless -D is also specified One could just remove the word 'only'? > > If neither --download nor --local-install is specified, the default > is to repeat the same action as from the previous run. If no > previous run can be found, the default is to perform both actions, > and both actions can be explicitly requested by specifying both > --download and --local-install. Note that I tweaked the behaviour of this a bit in [1] [1] https://cygwin.com/git/?p=cygwin-apps/setup.git;a=commit;h=147fc15d0222e050779b18a209991c258d85944f I think that makes the current help text accurately describe non-interactive mode. There are some cases in interactive mode which are obscure (e.g. '-M' without '-D' or '-L' gets you whatever mode you used last time without showing you what it was, but I'm not sure if that needs to be here. > In particular, the fact that the two options currently say they will > "only" do their action, and that the default is to perform both, lead me > to believe (a) the options were mutually exclusive and one would > presumably override the other, (b) this was probably a legacy from > before setup.rc stored the previous action, and therefore (c) if I was > running setup with `-q` or `-M`, there was no way to get the supposedly > default "do both" behaviour; I'd instead need to go through the full > GUI. > > Having now seen how this setting is stored, I've realised I can just > call setup with `-DL` and it'll perform both actions again. But I think > my assumption that "default" was supposed to mean "default always" not > "default only on first run" wasn't *entirely* PEBCAK (even if it mostly > was), so that help text would definitely benefit from being made a bit > more explicit. > > (I'm aware my suggestion above is decidedly wordy; it's not intended to > be exactly what I think is required, only a first pass at clarifying the > key details I think are missing.) Perhaps the best thing would be to have something like '--mode={download, install, somebetterwordforboth}' and document '-D' and '-L' as short aliases for forms of that (which makes the modality clear). -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple