Bug 2057979 - Installing tk does not install python3-tkinter by default
Summary: Installing tk does not install python3-tkinter by default
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-24 09:14 UTC by Miro Hrončok
Modified: 2024-05-07 15:52 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2022-02-24 09:14:53 UTC
Despite our intention to install python3-tkinter by default when tk is (being) installed, it does not work.


[root@3de53b57711d /]# rpm -q python3-libs
python3-libs-3.10.2-1.fc35.x86_64

[root@3de53b57711d /]# rpm -q dnf
dnf-4.9.0-1.fc35.noarch

[root@3de53b57711d /]# rpm -q libdnf
libdnf-0.64.0-1.fc35.x86_64

[root@3de53b57711d /]# rpm -q tk
package tk is not installed

[root@3de53b57711d /]# rpm -q --recommends python3-libs
(python3-tkinter(x86-64) = 3.10.2-1.fc35 if tk(x86-64))
python3(x86-64) = 3.10.2-1.fc35




[root@3de53b57711d /]# dnf -y install 'tk(x86-64)'
... no python3-tkinter ...

Here we want python3-tkinter to be installed, but it is not.




[root@3de53b57711d /]# dnf -y reinstall python3-libs
... Installing weak dependencies: python3-tkinter ...




There might be many causes, including but not limited to:

 - rich deps don't work with %_isa (x86-64)
 - rich deps don't like to be fully versioned
 - a bug in (lib)dnf



I will try changing the dependency in various ways to see if it helps.

Comment 1 Miro Hrončok 2022-02-24 09:18:24 UTC
Removing %_isa from tk does not help:

(python3-tkinter(x86-64) = 3.10.2-1.fc35 if tk)

Comment 2 Miro Hrončok 2022-02-24 09:27:56 UTC
Removing %_isa entirely does not help either:

(python3-tkinter = 3.10.2-1.fc35 if tk)

Comment 3 Miro Hrončok 2022-02-24 09:41:07 UTC
Removing both %_isa and version does not help:

(python3-tkinter if tk)

Comment 4 Miro Hrončok 2022-02-24 10:21:31 UTC
Taking the original:

Recommends: (python3-tkinter(x86-64) = 3.10.2-1.fc35 if tk(x86-64))

And changing it to a hard depndnecy:

Requires: (python3-tkinter(x86-64) = 3.10.2-1.fc35 if tk(x86-64))


Makes dnf do the right thing and install python3-tkinter when tk is (being) installed.

Since the assumption is that Recommends behaves like Requires by default when it is resolvable, I assume this is a bug in (lib)dnf.

Comment 5 amatej 2022-03-03 09:46:28 UTC
I have found that there is a libsolv flag SOLVER_FLAG_STRONG_RECOMMENDS that controls this behavior, addded here: https://github.com/kontura/libsolv/commit/55f5574a609097ce341265776863d977da7721ad, libdnf currently doesn't set it.

It is a pretty big change, not sure how representative this is but I have tried it on a fully upgraded f35 container with 580 packages and it wanted to install 206 additional packages. I think it wouldn't be so many on a regular system but still.

We probably want to leave such a change for dnf5, where it could also be configurable.

Comment 6 Ben Cotton 2022-11-29 17:57:32 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 7 Ben Cotton 2023-04-25 16:54:28 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 8 Jaroslav Mracek 2023-08-24 14:32:03 UTC
I think we can add a support for SOLVER_FLAG_STRONG_RECOMMENDS but it has to be configurable and the default should be disabled. The behavior sounds like a good idea from packager maintainer but it would be a nightmare for debugging.

Comment 9 Aoife Moloney 2023-11-23 00:09:23 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Aoife Moloney 2024-05-07 15:45:14 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.


Note You need to log in before you can comment on or make changes to this bug.