[PATCH setup 11/11] Ensure we only set user_picked when appropriate

2019-08-01 Thread Jon Turney
Add an optional parameter to set_action(), to indicate the action is the result of user action, and only set user_picked then. Set that parameter when installing from the command line. All other user actions come through select_action(), so also set that parameter there. --- choose.cc | 2

[PATCH setup 10/11] Use stored action in packagemeta::action_caption()

2019-08-01 Thread Jon Turney
Use the stored action in packagemeta::action_caption(), rather than working backwards from desired/installed/picked. --- package_meta.cc | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/package_meta.cc b/package_meta.cc index 8fad50d..b417fb0 100

[PATCH setup 09/11] Use stored action in packagemeta::list_actions()

2019-08-01 Thread Jon Turney
Use the stored action in packagemeta::list_actions(), rather than working backwards from desired/installed/picked. --- package_meta.cc | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/package_meta.cc b/package_meta.cc index 2564f95..8fad50d 100644 ---

[PATCH setup 08/11] Allow better handling of an obsolete package specified on command line

2019-08-01 Thread Jon Turney
Now we have the flexibilty to record a package as explicitly required to be installed, rather than merely installed because the desired version is different to the installed version, we can record packages selected for installation on the command line as distinct from choosing a specific version of

[PATCH setup 07/11] Use stored action in setting up solver

2019-08-01 Thread Jon Turney
Use stored action in setting up the solver, rather than working out what the action was from _picked/installed/desired. --- libsolv.cc | 47 ++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/libsolv.cc b/libsolv.cc index bd8fa4c..cbc651

[PATCH setup 06/11] Use packagemeta::set_action() to update action

2019-08-01 Thread Jon Turney
Use packagemeta::set_action() to update the action for packagemeta object in more (hopefully all) the places it gets changed. (Future work: ideally we'd opaque packagemeta internals more by making installed/curr/desired/etc. object private, rather than letting users grovel around in those details)

[PATCH setup 05/11] Store the requested action in packagemeta::set_action()

2019-08-01 Thread Jon Turney
Store the action requested with set_action() in the packagemeta object, rather than just encoding it in _picked/installed/desired (see discussion in commit 4209699d) Try to avoid meaningless states occuring, i.e. action=Install with desired=installed is converted to action=Keep. Future work: Ther

[PATCH setup 04/11] Rename 'Default' packagemeta action to 'NoChange' for clarity

2019-08-01 Thread Jon Turney
--- PickCategoryLine.cc | 2 +- PickView.h | 2 +- choose.cc | 6 +++--- package_meta.cc | 19 +++ package_meta.h | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/PickCategoryLine.cc b/PickCategoryLine.cc index 7aa1f28..7c1d46

[PATCH setup 03/11] Make packagemeta::message private

2019-08-01 Thread Jon Turney
--- package_meta.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package_meta.h b/package_meta.h index 1f0361e..2c40102 100644 --- a/package_meta.h +++ b/package_meta.h @@ -140,8 +140,6 @@ public: bool srcpicked() const; /* true if source for desired version is to be

[PATCH setup 00/11] Improve handling of specifying an obsolete package to be installed on the command line

2019-08-01 Thread Jon Turney
e.g. setup -q -g -P python3-lxml (which used to do something useful) currently gets you an (empty) python3-lxml package, which will be replaced by python36-lxml (which obsoletes it) on the next setup run. After this change, python36-lxml is installed instead. See also the dicusssion at https:/

[PATCH setup 02/11] Remove unused packagemeta::key

2019-08-01 Thread Jon Turney
Contains an identical value to packagemeta::name --- package_meta.cc | 2 +- package_meta.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package_meta.cc b/package_meta.cc index 3509f05..a4f6c93 100644 --- a/package_meta.cc +++ b/package_meta.cc @@ -70,7 +70,7 @@ package

[PATCH setup 01/11] Remove 'Bin?' column

2019-08-01 Thread Jon Turney
The only use this column appears to have now is that unticking it is the same as selecting 'uninstall'. Future work: Make 'Src?' column more independent, rather than interacting with the 'New' (action) column in non-obvious ways. We should be able to choose to install source irrespective of the st