From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-049.btinternet.com (mailomta23-re.btinternet.com [213.120.69.116]) by sourceware.org (Postfix) with ESMTPS id 389EB385700A for ; Tue, 20 Apr 2021 20:31:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 389EB385700A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=jon.turney@dronecode.org.uk Received: from re-prd-rgout-002.btmx-prd.synchronoss.net ([10.2.54.5]) by re-prd-fep-049.btinternet.com with ESMTP id <20210420203122.YISY30724.re-prd-fep-049.btinternet.com@re-prd-rgout-002.btmx-prd.synchronoss.net> for ; Tue, 20 Apr 2021 21:31:22 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-SNCR-Rigid: 5ED9C0CC2FB5AD86 X-Originating-IP: [81.153.98.246] X-OWM-Source-IP: 81.153.98.246 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduledrvddtiedgudehfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeguefhkedvfeeigefhhedtjeehieegtdehhffhheffgfehheegtdffleejteeuueenucfkphepkedurdduheefrdelkedrvdegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrudduudgnpdhinhgvthepkedurdduheefrdelkedrvdegiedpmhgrihhlfhhrohhmpeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoegthihgfihinhdqrghpphhssegthihgfihinhdrtghomheq X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.111] (81.153.98.246) by re-prd-rgout-002.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5ED9C0CC2FB5AD86 for cygwin-apps@cygwin.com; Tue, 20 Apr 2021 21:31:22 +0100 Subject: Re: [PATCH setup] Handle '--packages package=version' To: "cygwin-apps@cygwin.com" References: <20210418133444.1287-1-jon.turney@dronecode.org.uk> <2224401c94a04a7d93e53669af4ed30f@metastack.com> From: Jon Turney Message-ID: <17878a08-bd57-4ea4-ec07-039244c96bca@dronecode.org.uk> Date: Tue, 20 Apr 2021 21:30:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <2224401c94a04a7d93e53669af4ed30f@metastack.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3571.2 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 20:31:33 -0000 On 20/04/2021 15:35, David Allsopp via Cygwin-apps wrote: > Jon Turney wrote: >> Handle '--packages package=version' to allow specifing the version of a >> package to install on the command line. >> >> isManuallyWanted() now returns the target packageversion (if specified), >> or an empty packageversion (which is translated into an instruction to >> the solver to choose the version). >> >> In the 'upgrade' case, this changes from using the complex logic of >> packagemeta::trustp() to determine the target version, when unspecified >> on the command line, to allowing the solver to make that decision (which >> should be broadly the same i.e. not downgrading test versions, etc.). >> >> This also subtly changes the behaviour when the package version is not >> specified. Instead of forcing the current version, we allow the solver >> to choose the version, so it may not pick that version, if other >> constraints exist, which prevent a solution containing that version. >> >> There's probably some future work which can be done to simplify the >> remaining uses packagemeta::trustp(), which are only related to the UI. > > > > This is really useful (tested locally for a couple of use-cases: one wanting > a downgrade from latest and the other to manually specify a test version). Thanks for testing. > Does libsolv give the ability to put more complex constraints? In opam, for > example, I can issue `opam install 'utop<2.7.0' and get the last version > before 2.7.0. > > `--packages mingw64-x86_64-binutils=2.35.2-1` is already very useful but > `--packages mingw64-x86_64-binutils<2.36` is even more so. Yes, I think so. But more plumbing would be required to connect that up.