From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24373 invoked by alias); 8 Mar 2018 21:59:07 -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 24362 invoked by uid 89); 8 Mar 2018 21:59:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=offer, transaction, HContent-Transfer-Encoding:8bit X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.13.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Mar 2018 21:59:05 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id w28Lx3EM021805 for ; Thu, 8 Mar 2018 16:59:03 -0500 Received: from [192.168.0.15] (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id w28Lx14r014092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 8 Mar 2018 16:59:02 -0500 Subject: Re: setup: problems with local install To: cygwin-apps@cygwin.com References: <3cd80653-6a63-ae3d-d79c-a1642ad63fce@cornell.edu> <76209447-c5a7-2fa4-941e-4040a2de484f@dronecode.org.uk> <19b10cbb-42bc-c82f-be30-57296d3de6c9@cornell.edu> <2e15f4fb-60b5-49f8-ce8b-cd2a9c07271e@cornell.edu> From: Ken Brown Message-ID: <27cb1d93-5aba-8a38-14b2-c0de3eedcfdf@cornell.edu> Date: Thu, 08 Mar 2018 21:59:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2e15f4fb-60b5-49f8-ce8b-cd2a9c07271e@cornell.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00017.txt.bz2 On 3/8/2018 10:59 AM, Ken Brown wrote: > On 3/7/2018 4:52 PM, Ken Brown wrote: >> On 3/6/2018 1:47 PM, Jon Turney wrote: >>> On 06/03/2018 15:18, Jon Turney wrote: >>>> So yeah, I guess putting some complexity back in accessible() would >>>> work, or perhaps the attached?  (This doesn't do the right thing for >>>> a few packages, for reasons I'm still looking into...) >>> >>> To be specific it was doing the wrong thing for those few packages >>> with no source >>> >>>>   /* scan for local copies of package */ >>>> -void >>>> +bool >>>>   packagemeta::scan (const packageversion &pkg, bool mirror_mode) >>>>   { >>>> -  /* Already have something */ >>>> +  /* empty version */ >>>>     if (!pkg) >>>> -    return; >>>> +    return true; >>> >>> So, this needs to be 'return false', as the empty version is always >>> inaccessible, to get the same behaviour as before. >> >> I've found another problem with local installs: If a package needs >> upgrading, then the chooser will offer the upgraded version for >> install, even if there's no archive available.  As a result, the >> current version will get uninstalled, and then setup will discover >> that it doesn't have the archive to install the new version. >> >> The problem occurs because packagedb::defaultTrust() is called after >> ScanDownloadedFiles() has already done its work.  solution.update() >> and solution.trans2db() are called, and pkg->desired is set equal to >> an inaccessible version pv (which has been previously removed from >> pkg->versions). >> >> I guess trans2db() should check that pv is in pkg->versions before >> acting on an install transaction for pv.  And then we also have to >> make sure to ignore the erase transaction for the current version of pkg. >> >> Alternatively, can we just remove an inaccessible packageversion from >> the libsolv pool, or at at least just tell libsolv that we don't want >> to install it? > > Still another alternative, and maybe the simplest, is to make sure that > the chooser never shows a version that is not in pkg->versions. > packagemeta::set_action (trusts const trust) almost does this, except > for one useless desired.accessible() call.  So that should be fixed, as > well as the setting of the initial action. Sorry for this stream of consciousness series of posts, but I'll stop after this one. I think it's possible that restoring the previous meaning of 'accessible()', at least for local installs, might solve this problem. Ken