From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e2i632.smtp2go.com (e2i632.smtp2go.com [103.2.142.120]) by sourceware.org (Postfix) with ESMTPS id 95473386188D for ; Tue, 20 Apr 2021 14:35:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 95473386188D Received: from [10.139.162.187] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92-S2G) (envelope-from ) id 1lYrSw-qt4BXr-GR for cygwin-apps@cygwin.com; Tue, 20 Apr 2021 14:35:02 +0000 Received: from [10.62.31.23] (helo=romulus.metastack.com) by smtpcorp.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92-S2G) (envelope-from ) id 1lYrSw-4Xa8ab-6S for cygwin-apps@cygwin.com; Tue, 20 Apr 2021 14:35:02 +0000 Received: from remus.metastack.local (usr233-bra.static.cable.virginmedia.com [62.31.23.243] (may be forged)) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id 13KEYwgI013156 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 20 Apr 2021 15:34:58 +0100 Received: from Hermes.metastack.local (172.16.0.8) by Hermes.metastack.local (172.16.0.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 20 Apr 2021 15:35:24 +0100 Received: from Hermes.metastack.local ([fe80::210d:d258:cd04:7b5a]) by Hermes.metastack.local ([fe80::210d:d258:cd04:7b5a%3]) with mapi id 15.01.2176.012; Tue, 20 Apr 2021 15:35:24 +0100 From: David Allsopp To: "cygwin-apps@cygwin.com" Subject: RE: [PATCH setup] Handle '--packages package=version' Thread-Topic: [PATCH setup] Handle '--packages package=version' Thread-Index: AQHXNFffs1cH6b1dkU6WH9+SITpqQ6q9eiWw Date: Tue, 20 Apr 2021 14:35:24 +0000 Message-ID: <2224401c94a04a7d93e53669af4ed30f@metastack.com> References: <20210418133444.1287-1-jon.turney@dronecode.org.uk> In-Reply-To: <20210418133444.1287-1-jon.turney@dronecode.org.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.125] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.65 on 62.31.23.242 X-Smtpcorp-Track: 1_YrSw4ba8aP6S.f_abd4SxGqKD7 Feedback-ID: 614951m:614951apMmpqs:614951sssmqFW4hU X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_05, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_PASS, SPF_PASS, 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 14:35:15 -0000 Jon Turney wrote: > Handle '--packages package=3Dversion' to allow specifing the version of a > package to install on the command line. >=20 > 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). >=20 > 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.). >=20 > 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. >=20 > 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 wantin= g a downgrade from latest and the other to manually specify a test version). 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=3D2.35.2-1` is already very useful but `--packages mingw64-x86_64-binutils<2.36` is even more so. David