From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) by sourceware.org (Postfix) with ESMTPS id 6F66A3840909 for ; Fri, 16 Dec 2022 15:40:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F66A3840909 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de Received: from fwd76.dcpf.telekom.de (fwd76.aul.t-online.de [10.223.144.102]) by mailout12.t-online.de (Postfix) with SMTP id 6BA1D15123; Fri, 16 Dec 2022 16:40:16 +0100 (CET) Received: from [192.168.2.101] ([87.187.32.177]) by fwd76.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1p6Con-1SQcAi0; Fri, 16 Dec 2022 16:40:13 +0100 Subject: Re: [PATCH setup] Ignore reinstall requests if version is not accessible To: Jon Turney , "cygwin-apps@cygwin.com" References: <0961ff47-79c8-30af-53e4-43df240d4d99@dronecode.org.uk> From: Christian Franke Message-ID: <0c87ef72-4fdd-073e-a379-dfc2ea7630b5@t-online.de> Date: Fri, 16 Dec 2022 16:40:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 SeaMonkey/2.53.14 MIME-Version: 1.0 In-Reply-To: <0961ff47-79c8-30af-53e4-43df240d4d99@dronecode.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TOI-EXPURGATEID: 150726::1671205213-ECFFEA26-7D208229/0/0 CLEAN NORMAL X-TOI-MSGID: 6cefda1a-a0ec-423b-bf6d-07ac5a35da8a X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Jon Turney wrote: > On 11/12/2022 15:11, Christian Franke via Cygwin-apps wrote: >> This prevents accidental package loss if reinstall is run from local >> directory but the package is no longer cached. > > Thanks.  This seems right, so please apply. Done. Could you please also review "[PATCH setup] Add tooltip for Ctrl+I/R/U accelerator keys" before next release? > >> Possible further improvement: Do not offer "Reinstall" in the popup >> menu in this case. > > Indeed. > > That might be simply fixable, but really, we need to keep an index of > the files in the package cache, so we can handle situations like this > properly, without spending lots of time spinning rust Agree. "Install from Local Directory" is in particular slow on HDDs when directory tree is fragmented or even slower if the cache is on a network share. > (we could then also do some expiry on the cache, which is a feature > that has been needed for decades...) For example: Add checkbox(es) to LocalDirPage to enable/configure cache cleanup. In a later step remove all files that could no longer be downloaded (like Debian's "apt-get autoclean") and are no longer installed. The latter would need some heuristics for source packages as these do not appear in installed.db. BTW, I have a local bash-script 'cygcache' which allows to list package states ([auto]installed, cached, curr/prev/test), cleanup the cache using above rules (configurable) or merge cache directories into one. Still requires some polishing. If there is any interest, I could ITP it next year.