From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107489 invoked by alias); 31 May 2017 10:53:23 -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 107438 invoked by uid 89); 31 May 2017 10:53:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=stability, rpm, RPM, lightly X-HELO: rgout04.bt.lon5.cpcloud.co.uk Received: from rgout04.bt.lon5.cpcloud.co.uk (HELO rgout04.bt.lon5.cpcloud.co.uk) (65.20.0.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 May 2017 10:53:16 +0000 X-OWM-Source-IP: 86.141.128.130 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-Junkmail-Premium-Raw: score=8/50,refid=2.7.2:2017.5.13.91815:17:8.707,ip=,rules=NO_URI_FOUND, NO_CTA_URI_FOUND, NO_MESSAGE_ID, NO_URI_HTTPS, TO_MALFORMED Received: from localhost.localdomain (86.141.128.130) by rgout04.bt.lon5.cpcloud.co.uk (9.0.019.13-1) (authenticated as jonturney@btinternet.com) id 58482DA21281A2C0; Wed, 31 May 2017 11:53:18 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP) Date: Wed, 31 May 2017 10:53:00 -0000 Message-Id: <20170531105015.162228-1-jon.turney@dronecode.org.uk> X-SW-Source: 2017-05/txt/msg00161.txt.bz2 ... solve some problems, perhaps add some new ones, I guess. I'm not 100% sure this is the right approach to take, but I wrote it, so here it is. This replaces the current PackageVersion class with a similar one which stores the information in a libsolv pool, and the current depsolver with the libsolv solver (as used by zypper, dnf and others). Immediately, this enables: - use of a version relation in package dependencies - an obsoletes: relation between packages This also makes it much easier to support: - version numbers with an epoch component (I think just how we handle ':' in filenames needs auditing to make this work) - other commonly-implemented package relations such as conflicts:, provides: etc. What remains to be done: - I've dodged a lot of the UI issues: If the solver reports problems, all that can be done is accept the default solution or cancel. This possibly isn't a big problem until we have a package set which can contain problems... - We had a very poor UI for showing what will actually be done (combine in your head the "Pending" view with packages listed in the text on the PrereChecker page), and this removes part of that - As implemented, selecting "Current" overrides "Keep". This is wrong, and a change from current behaviour, but is probably a symptom of some deeper confusion in the picker UI I'm not sure how to address libsolv needs to be lightly patched to build for Win32, see [1]. I will ITP that, but it probably also needs an RPM to support cross-building. [1] https://github.com/jon-turney/libsolv Jon Turney (14): Opaque how PackageDepends is stored Factor out reading installed.db Hoist addScript() etc. up from packageversion to packagemeta Hoist pick() up to packagemeta Hoist uninstall up to Installer::uninstallOne() Hoist scan() up from packageversion to packagemeta Store package stability in class packageversion Change to using a libsolv pool for storing package information Remove cygpackage class Remove packageversion class Drop in SolvableVersion as a replacement for packageversion Use solver to check for problems and produce a list of package transactions Download/checksum/install/uninstall what transaction wants Add obsoletes: support IniDBBuilderPackage.cc | 331 ++++++++--------------- IniDBBuilderPackage.h | 32 ++- Makefile.am | 7 +- PackageSpecification.cc | 12 + PackageSpecification.h | 7 +- PickPackageLine.cc | 14 +- PickView.cc | 9 +- bootstrap.sh | 2 +- choose.cc | 8 +- configure.ac | 1 + cygpackage.cc | 187 ------------- cygpackage.h | 88 ------- desktop.cc | 1 - download.cc | 72 ++--- ini.cc | 1 + inilex.ll | 1 + iniparse.yy | 3 + install.cc | 176 ++++++++----- libsolv.cc | 689 ++++++++++++++++++++++++++++++++++++++++++++++++ libsolv.h | 231 ++++++++++++++++ package_db.cc | 115 ++++++-- package_db.h | 8 + package_depends.cc | 19 +- package_depends.h | 2 +- package_meta.cc | 294 ++++++++++++--------- package_meta.h | 30 ++- package_version.cc | 414 ----------------------------- package_version.h | 190 +------------ postinstall.cc | 6 +- prereq.cc | 206 ++++----------- prereq.h | 22 +- res.rc | 4 +- 32 files changed, 1606 insertions(+), 1576 deletions(-) delete mode 100644 cygpackage.cc delete mode 100644 cygpackage.h create mode 100644 libsolv.cc create mode 100644 libsolv.h delete mode 100644 package_version.cc -- 2.12.3