This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Wed, 31 May 2017 11:50:01 +0100
- Subject: [PATCH setup 00/14] Use libsolv, solve all our problems... (WIP)
- Authentication-results: sourceware.org; auth=none
... 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