From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113772 invoked by alias); 19 Sep 2017 16:55:16 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 113754 invoked by uid 9996); 19 Sep 2017 16:55:16 -0000 Date: Tue, 19 Sep 2017 16:55:00 -0000 Message-ID: <20170919165515.113656.qmail@sourceware.org> From: kbrown@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch topic/libsolv, created. release_2.881-39-g4ec3f74 X-Git-Refname: refs/heads/topic/libsolv X-Git-Reftype: branch X-Git-Oldrev: 0000000000000000000000000000000000000000 X-Git-Newrev: 4ec3f744e680a07540d182a9dfdca68697403a1f X-SW-Source: 2017-q3/txt/msg00013.txt.bz2 at 4ec3f744e680a07540d182a9dfdca68697403a1f (commit) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=4ec3f744e680a07540d182a9dfdca68697403a1f commit 4ec3f744e680a07540d182a9dfdca68697403a1f Author: Ken Brown Date: Tue Sep 19 12:45:53 2017 -0400 Partially revert "Let the user review packages added to resolve dependencies" This reverts most of commit 4bce51b49f9c773316615f5c31a32ebfca9984c1. It turned out to be too annoying to have setup stop to tell the user that dependencies were added, without giving any details. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8868797b1ccdbbfe47af4ce3af546ae19bec1b3f commit 8868797b1ccdbbfe47af4ce3af546ae19bec1b3f Author: Ken Brown Date: Sat Sep 16 12:06:58 2017 -0400 Tweak .gitignore https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=4ba7cbf9a034253811fd86d640994fe40f8429d5 commit 4ba7cbf9a034253811fd86d640994fe40f8429d5 Author: Ken Brown Date: Sat Sep 16 12:03:12 2017 -0400 Tweak comment https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=460d6f8917dff87479b080465f30b246702bab17 commit 460d6f8917dff87479b080465f30b246702bab17 Author: Ken Brown Date: Sat Sep 16 11:51:11 2017 -0400 Remove PrereqChecker::upgrade Also remove the 'update' parameter from SolverSolution::update. These were introduced so that the SOLVER_UPDATE | SOLVER_SOLVABLE_ALL command could be sent to the solver if and only if 'Keep' was not globally selected. But that command doesn't seem to be needed, so we just remove it and simplify the code. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=6917e146ba275916a15b7abe1c47891683964d66 commit 6917e146ba275916a15b7abe1c47891683964d66 Author: Ken Brown Date: Sat Sep 16 11:39:40 2017 -0400 Allow user to refuse the default problem solutions Add new method SolverSolution::db2trans to change the solver's transaction list to reflect the package database. Use it if the user refuses the default problem solutions. Reinstate warning that this could cause breakage. Remove PrereqPage::OnMessageCmd, which is no longer needed (and which disallows clicking Next if the "Accept default problem solutions" box is unchecked). https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=d7945658503dd65bf82c1d2d9da051bf52a16080 commit d7945658503dd65bf82c1d2d9da051bf52a16080 Author: Ken Brown Date: Sat Sep 16 11:32:57 2017 -0400 Try to improve the solver's default solution Set the solver flag SOLVER_FLAG_FOCUS_BEST. This helps in the following situation: A required package has an update available. The user chooses uninstall. Without the flag the default solution is to keep the (outdated) package. With the flag the default is to upgrade. It remains to be seen whether the flag has any undesired effects. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b6b50d69bffa3c8574878be57f0e50445b2849eb commit b6b50d69bffa3c8574878be57f0e50445b2849eb Author: Ken Brown Date: Sat Sep 16 11:28:37 2017 -0400 Add a ficitious "base" package that requires all Base packages Modify the solver's problem report so that it refers to "Base packages" rather than the "base" package. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=4bce51b49f9c773316615f5c31a32ebfca9984c1 commit 4bce51b49f9c773316615f5c31a32ebfca9984c1 Author: Ken Brown Date: Sat Sep 16 11:23:04 2017 -0400 Let the user review packages added to resolve dependencies Add SolverTasks::install_count to help with this. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f1739c8e93b2463cdb9a2b79c421ff44a1032f7a commit f1739c8e93b2463cdb9a2b79c421ff44a1032f7a Author: Ken Brown Date: Fri Sep 8 11:16:24 2017 -0400 Add new member function SolverSolution::trans2db This resets the package database to reflect the solver's transaction list. Call this if the user clicks Back on the Prerequisite page, to allow reviewing and making changes before accepting the solver's solution. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=e709523b6d5cbcb2089c7c7ea9e1dfd64a116bca commit e709523b6d5cbcb2089c7c7ea9e1dfd64a116bca Author: Ken Brown Date: Sat Sep 16 10:50:37 2017 -0400 Refactor Move the code from prereq.cc that makes a solver task list into a new function SolverTasks::setTasks. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=97d08bb8d6b39e226cccf16f247d4c947966df49 commit 97d08bb8d6b39e226cccf16f247d4c947966df49 Author: Ken Brown Date: Sat Sep 2 14:35:58 2017 -0400 Simplify code in install.cc https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=9c4b4c1f13c10f9026dac41cf0070cd721702dce commit 9c4b4c1f13c10f9026dac41cf0070cd721702dce Author: Ken Brown Date: Mon Sep 4 16:44:31 2017 -0400 Fix 'SolverTasks::taskList' typedef Remove the '&'. This was causing source installs to all refer to the same package, due to the call to q.add(pkg->desired.sourcePackage(), SolverTasks::taskInstall) in PrereqChecker::isMet. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=198d5b3e63ccca5f46365107b1a79f03d2e5453d commit 198d5b3e63ccca5f46365107b1a79f03d2e5453d Author: Ken Brown Date: Sat Sep 2 14:27:52 2017 -0400 Download only the packages being installed https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=7c948a4b7a0a7d4a883e87fceaaa83130741c573 commit 7c948a4b7a0a7d4a883e87fceaaa83130741c573 Author: Ken Brown Date: Wed Sep 6 10:44:27 2017 -0400 Don't create an "_installed_test_" repo This prevents libsolv from knowing that an installed test release is installed, since pool->installed is "_installed". https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=44e0f027972f0730b93ccfea4b58e5293d43aac5 commit 44e0f027972f0730b93ccfea4b58e5293d43aac5 Author: Ken Brown Date: Tue Sep 5 22:22:23 2017 -0400 Allow the installation of test packages without setting "Test" globally Instead of disabling test repos when "Test" is not selected, just give them lower priority than ordinary repos. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=d3994da9f6cd502885decdae1c81b1f763c1f12c commit d3994da9f6cd502885decdae1c81b1f763c1f12c Author: Ken Brown Date: Sat Sep 16 10:06:26 2017 -0400 Ask solver to check dependencies of installed packages https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=18ff48d7f013b3c91824b7573d9b5a35aed2ee90 commit 18ff48d7f013b3c91824b7573d9b5a35aed2ee90 Author: Ken Brown Date: Sat Sep 2 12:37:29 2017 -0400 Improve the reading of installed.db When creating a packageversion for a package listed in installed.db, use the information for the installed version rather than the "current" version. Add a new function packagedb::findBinaryVersion to help with this. Get as much information about an installed information as possible from the prior reading of setup.ini. Improve detection of installed test releases. An installed test release might not appear in setup.ini because it is no longer available (e.g., it might have been replaced by a newer test release). Detect this by comparing its version to the current version. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8b0eb113e7b5ca882caa45e2491ea6b256eab738 commit 8b0eb113e7b5ca882caa45e2491ea6b256eab738 Author: Ken Brown Date: Sat Sep 16 07:19:55 2017 -0400 Add an optional argument to SolvableVersion::depends This allows it to optionally return the obsoletes list instead of the dependency list. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=72829e2d94683be9b03c6975ac62ce7451797908 commit 72829e2d94683be9b03c6975ac62ce7451797908 Author: Ken Brown Date: Sat Sep 2 11:57:25 2017 -0400 Fix setup.ini parsing The IniDBBuilderPackage::process function wasn't fully resetting the addPackageData for a new version of a package. This caused SHA512 failures among other things. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=c21037d591028c2ae5159e027d318b9fedf2ca41 commit c21037d591028c2ae5159e027d318b9fedf2ca41 Author: Ken Brown Date: Wed Aug 30 17:36:13 2017 -0400 Don't override a Keep selection https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=428dd3e2ebafebcb6423f5f4a00c3de5b50bf220 commit 428dd3e2ebafebcb6423f5f4a00c3de5b50bf220 Author: Ken Brown Date: Thu Sep 7 13:29:23 2017 -0400 Fix typo in bootstrap.sh https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=1142f93eb760293ca9fcdbc710d3c935438b735f commit 1142f93eb760293ca9fcdbc710d3c935438b735f Author: Ken Brown Date: Mon Sep 11 15:15:28 2017 -0400 Fix typo https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=7bc6f5f18b4fa67016b43ca460777c043360188a commit 7bc6f5f18b4fa67016b43ca460777c043360188a Author: Jon Turney Date: Fri May 26 14:30:40 2017 +0100 Handling 'Source:' lines XXX: need some approach when -src pkg isn't seen until after pkg (Note and cache?) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=5b79473e73117df95aef4d9a744f65489c2bb50f commit 5b79473e73117df95aef4d9a744f65489c2bb50f Author: Jon Turney Date: Mon May 22 19:53:11 2017 +0100 Handle epoch versions Fix base() to know that ':' in a filename doesn't necessarily indicate a path element. XXX: check that scan still works... https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f548124b6e237798c6716b7984abe66eb7110ab5 commit f548124b6e237798c6716b7984abe66eb7110ab5 Author: Jon Turney Date: Wed May 3 11:56:36 2017 +0100 Debug https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=fc43c5077ac797cf6f0ae514ec5936043c623399 commit fc43c5077ac797cf6f0ae514ec5936043c623399 Author: Jon Turney Date: Mon May 22 18:04:02 2017 +0100 Add obsoletes: support Note that we need separate depends and obsoletes nodelists https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a198539d3b4b1163db83552f7dbfb0e3ace2658f commit a198539d3b4b1163db83552f7dbfb0e3ace2658f Author: Jon Turney Date: Fri May 19 11:26:07 2017 +0100 Download/checksum/install/uninstall what transaction wants Some of this goes rather around the houses to avoid lots of churm: In lots of cases, we're looking up packagemeta for a given packageversion just so we can use the pacakgemeta to access the name, which we could do via packageversion just as easily. We do actually need packagmeta for a couple of things: To note the package as installed/uninstalled, and to note postinstalls scripts. If IncludeSource is on source packages installs will have been added to the task list in post-processing, so we don't need to handle that specially anymore. Source packages to be installed are kept in a separate queue as they are installed differently to binary packages (root is /usr/src, install isn't recorded, etc.) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8c9d6850cedf9deca6261f5504f3a3514d607519 commit 8c9d6850cedf9deca6261f5504f3a3514d607519 Author: Jon Turney Date: Sat Apr 29 15:43:52 2017 +0100 Use solver to check for problems and produce a list of package transactions Convert chooser UI selections into a SolverTaskList Apply SolverSolution to that task list (with choice of keep, upgrade, upgrade with test, IncludeSource) to produce a vector of SolverTransactions. Store a solution object in packagedb The transaction list returned by the solver is postprocessed to add reinstall and IncludeSource actions Very crudely present solver problems in the PrereqChecker page UI, as text. Change tickbox to say "accept default solutions" and don't allow to preceed unless those solutions are accepted (ideally we would have a UI to choose solutions). Remove warning about missing dependencies. Also pass initial trust state to PrereqChecker https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=e6fb580fce72f68d2ce9b42187c1559203788c39 commit e6fb580fce72f68d2ce9b42187c1559203788c39 Author: Jon Turney Date: Sat Apr 29 15:39:46 2017 +0100 Drop in SolvableVersion as a replacement for packageversion https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=62ec3248c6f4414da7b851858bcc46315ea50b5f commit 62ec3248c6f4414da7b851858bcc46315ea50b5f Author: Jon Turney Date: Fri Apr 28 17:39:26 2017 +0100 Remove packageversion class Remove packageversion, _packageversion, defaultversion classes https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=83457799ef73ba684c51f3996a9524a14b2b2ae8 commit 83457799ef73ba684c51f3996a9524a14b2b2ae8 Author: Jon Turney Date: Fri Apr 28 15:26:05 2017 +0100 Remove cygpackage class https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=2cb562511249f95c7c10b5e5d7e586bfa1b46519 commit 2cb562511249f95c7c10b5e5d7e586bfa1b46519 Author: Jon Turney Date: Fri Apr 7 21:52:17 2017 +0100 Change to using a libsolv pool for storing package information Add class SolverVersion, a wrapper around a Solvable Id. The interface is similar to class packageversion, the name change is just to make sure I've got everything. Place test packages into separate repos. Expressing that curr: packages are preferred to prev: ones when that is not the version number ordering should be done with epoch numbers. Wire up various bits of data in packageversion to Solvable attributes, including sourcepackage, stability, archive (packagesource) and depends. Store sourcePackage() by the id rather than name, for much faster lookup. SolverVersions for the same package can be ordered and compared by evr. Factor out packagedb:addBinary() and also use it in IniDBBuilder, rather that inlining the process of adding a package there. Add an analagous packagedb:addSource() to do the same thing for source packages. Change to reading installed.db after setup.ini's have been read, so we can supplement the installed.db packages with information from setup.ini. Make packagemeta::add_version() check for successful insertion of version. Record the version at a stability level. The last version wins in setting curr/test. Use a Solver object inside packagedb XXX: All SolvableVersion methods need to check for null solvable? https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=1e51f069c55881fdae6eea68611a3c04b3d21a0f commit 1e51f069c55881fdae6eea68611a3c04b3d21a0f Author: Jon Turney Date: Mon Apr 24 20:17:36 2017 +0100 Store package stability in class packageversion https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f467ff55aaef6af51aa262dae95693cc1040878f commit f467ff55aaef6af51aa262dae95693cc1040878f Author: Jon Turney Date: Wed Apr 26 16:22:30 2017 +0100 Hoist scan() up from packageversion to packagemeta https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8ed40875e78ca194dad4b3764b8bae14c30e0c93 commit 8ed40875e78ca194dad4b3764b8bae14c30e0c93 Author: Jon Turney Date: Tue Apr 25 23:44:08 2017 +0100 Hoist uninstall up to Installer::uninstallOne() This calls packagemeta, which applies to packageversion (which delegates through packageversion_ to cygpackage) to return lines from the .lst.gz file (pretending that we know it contains a file list for that specific version) and to remove the .lst.gz file when done. Move this all up into Installer::uninstallOne(), where it's all in the same place as the operation it is reversing, Installer::installOne(). https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=8c960848d0415c3030218f7252279cdec2869073 commit 8c960848d0415c3030218f7252279cdec2869073 Author: Jon Turney Date: Wed Apr 26 15:20:14 2017 +0100 Hoist pick() up to packagemeta We are always writing packagemeta.desired.pick(bool, packagemeta). This kind of suggests something not quite right. The pick flag means install/reinstall, so despite being stored per packageversion, is only significant to download/install for the desired version. There's a slight wrinkle in that we want to also set/clear this flag for the source packageversion. We can't change this to point to packagemeta rather than packageversion, as that may not be the same for all versions, so instead just track this flag separately as srcpicked. Note that there is still a complicated mapping between the state of desired and pick and the action represented in the UI: desired == empty, installed == desired : skip desired == empty, installed != desired : uninstall desired == installed, pick == true : reinstall desired == installed, pick == false : keep desired != installed, pick == true : upgrade desired != installed, pick == false : invalid https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f3be2fa10ea2ad07e5cdb3caef79048d08aa8941 commit f3be2fa10ea2ad07e5cdb3caef79048d08aa8941 Author: Jon Turney Date: Tue May 23 22:19:15 2017 +0100 Hoist addScript() etc. up from packageversion to packagemeta We're only interesting in storing scripts and later running them from the desired version as we install it, so despite being stored per packageversion, this is only significant for the desired version. Hoist it up from packageversion to packagemeta. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f8a0d5d0ecb3b48acd95bf4245a38b082c35b671 commit f8a0d5d0ecb3b48acd95bf4245a38b082c35b671 Author: Jon Turney Date: Sat May 20 16:17:44 2017 +0100 Factor out reading installed.db Rather that doing implicitly the first time a packagedb is constructed, do it explicitly at a certain point in time that is early enough. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=9f1aaf4f40be3eabeda36e623ae52e3cbac39da8 commit 9f1aaf4f40be3eabeda36e623ae52e3cbac39da8 Author: Jon Turney Date: Fri May 5 12:36:42 2017 +0100 Opaque how PackageDepends is stored We want to be more opaque about how the PackageDepends for a packageversion is stored, so rather than exposing a pointer to a PackageDepends object inside class packageversion, access it by value. This also makes us be more explicit about set/get of package depends() Fix some iterations to deal with depends() returning a value rather than a pointer. Also adjust dumpPackageDepends() appropriately Also remove useless debug showing the dependency list before we build it.