From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95822 invoked by alias); 23 May 2016 15:26:39 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 95453 invoked by uid 89); 23 May 2016 15:26:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:setup.exe, setupexe, setup.exe, CURRENT X-HELO: lb2-smtp-cloud6.xs4all.net Received: from lb2-smtp-cloud6.xs4all.net (HELO lb2-smtp-cloud6.xs4all.net) (194.109.24.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 23 May 2016 15:26:28 +0000 Received: from webmail.xs4all.nl ([194.109.20.209]) by smtp-cloud6.xs4all.net with ESMTP id xrSR1s0094WfiVN01rSRqr; Mon, 23 May 2016 17:26:25 +0200 Received: from a83-162-234-136.adsl.xs4all.nl ([83.162.234.136]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Mon, 23 May 2016 17:26:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 23 May 2016 15:26:00 -0000 From: Houder To: cygwin-apps@cygwin.com Subject: Re: [PATCH] Do not clear the prev, curr and exp fields of packagemeta. Never. In-Reply-To: <44110727-fec0-caba-84f5-5e4908ee13dc@dronecode.org.uk> References: <510b310a3f4f5a19abf1349216f013b3@xs4all.nl> <44110727-fec0-caba-84f5-5e4908ee13dc@dronecode.org.uk> Message-ID: X-Sender: houder@xs4all.nl (V/AnsvPDSPBO1bRzGbA1kA==) User-Agent: XS4ALL Webmail X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00099.txt.bz2 On 2016-05-23 15:44, Jon Turney wrote: >> This patch rectifies >> >> - packagemeta::ScanDownloadedFiles (package_meta.cc), and >> - packagemeta::trustp (package_meta.h) >> >> Clarification: >> Class packagemeta has "fields" prev, curr, exp and installed, which in >> fact >> represent the info from setup.ini/installed.db, and should never be >> cleared >> therefore. _Currently_ these fields are cleared in >> ScanDownloadedFiles() in >> order to notify that the tarball for the associated field is not >> available. >> This is a mistake, as it destroys relevant info (e.g. the version >> number of >> a version). >> To ascertain whether or not the associated tarball is available, one >> should >> invoke .accesible(). > > Can you clarify a bit about the problem that this patch solves? And > how you tested that it fixes it? Hi Jon, I reported the "problem" in March, here: https://cygwin.com/ml/cygwin/2016-03/msg00425.html - Package choosing algorithm ... However, in a nutshell the story is as follows: I install from "Local Directory" (i.e. not directly from a mirror; neither do I operate a local mirror). At that point in time I had installed a TEST version of the cygwin pkg. Then Corinna launched another TEST version of that package. After downloading that new version, I also removed the CURRENT version of that pkg (yes, nobody does that, except me). After that, I started setup.exe again in order to install the test version of the cygwin pkg, which I had downloaded. To my surprise, the new test version was NOT offered for install ... As I did not understand why, I started the thread above. Especially when Corinna told me, that it should work, I really started to get curious, and decided to study the source code of setup ... After some effort, I found the cause of the problem. Yes, the patch has been tested, but in order to describe what I did, I really need some more time (as it has been a while), and because I still have a hard time putting it down in English (not being my native tongue). Thank you for your interest in my patch (although it may not solve a problem, that is really important, it does improve the 'clarity' of the source code, I believe). Regards, Henri