Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sys-apps/policycoreutils python issue after...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 377

PostPosted: Mon Jun 03, 2024 12:29 am    Post subject: sys-apps/policycoreutils python issue after... Reply with quote

I just finished updating my profile, form 17.1 to 23. It is now set to " [59] default/linux/amd64/23.0/split-usr/hardened/selinux (stable) * ", which was the recomendation given by the upgrade process itself.
However, after reboot, I tried an @world update and it failed, with a python issue in policycoreutils:

Code:

~> sudo emerge --ask --update --deep --with-bdeps=y --changed-deps --newuse --changed-use @world
These are the packages that would be merged, in order:

Calculating dependencies \

!!! Problem resolving dependencies for sys-apps/policycoreutils from @system
... done!
Dependency resolution took 0.78 s (backtrack: 0/20).


!!! The ebuild selected to satisfy "sys-apps/policycoreutils" has unmet requirements.
- sys-apps/policycoreutils-3.6::gentoo USE="(audit) pam (split-usr)" ABI_X86="(64)" PYTHON_TARG

  The following REQUIRED_USE flag constraints are unsatisfied:
    any-of ( python_targets_python3_10 python_targets_python3_11 )

(dependency required by "@system" [set])
(dependency required by "@world" [argument])
~>


As you may see, PYTHON_TARGET is not set in my make.conf:

Code:

~> cat /etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C


USE="X policykit dbus elogind -consolekit alsa pulseaudio acl udev savedconfig threads unicode symlink crypt fortran lapack eselect-ldso bluetooth acpi"
MAKEOPTS="-j5"



SANE_BACKENDS="hp"

VIDEO_CARDS="intel nouveau"
INPUT_DEVICES="libinput wacom"

FEATURES="nostrip splitdebug"

POLICY_TYPES="strict"

LINGUAS="en pt pt_BR zh zn_CN"
L10N="en pt pt-BR zh zh-CN"



GRUB_PLATFORMS="efi-64"
# GENTOO_MIRRORS="http://gentoo.gossamerhost.com rsync://gentoo.gossamerhost.com/gentoo-distfiles/"
~>



and, apparently, I have all current supported python versions installed:

Code:

~> eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12 (fallback)
  [3]   python3.10 (fallback)
~>



Just for the sake of clarification, the upgrade wasn't flawless. During the last fase, there was an error with the "sudo emerge --ask --emptytree @world" command with the "dev-texlive/texlive-langgreek" package, which I circunvented doing "sudo emerge --ask --emptytree @world --exclude dev-texlive/texlive-langgreek". However I can't find a connection between an issue with a latex package and another with a system package.

EDIT: I just tried to add "--exclude=sys-apps/policycoreutils" to the @world update and the problem percolated into another package. Therefore it seams to be a system wide issue with my python...


Last edited by vcmota on Wed Jun 05, 2024 1:52 pm; edited 2 times in total
Back to top
View user's profile Send private message
mxh
n00b
n00b


Joined: 03 Jun 2024
Posts: 2

PostPosted: Mon Jun 03, 2024 1:53 am    Post subject: Reply with quote

SELinux depends on 4 stable ebuilds that are not yet Python 3.12 enabled. These have 16 additional dependencies. It might be better to defer the Python 3.12 upgrade and stay on Python 3.11 until all ebuilds are Python 3.12 enabled. (Or follow the first step of the "safer upgrade procedure" to have both Python 3.11 and 3.12.) For a mostly Python 3.12 system with only these packages and dependencies for Python 3.11, add these to package.use:
Code:
sys-apps/policycoreutils PYTHON_TARGETS: python3_11
sys-apps/selinux-python PYTHON_TARGETS: python3_11
sys-libs/libsemanage PYTHON_TARGETS: python3_11
sys-process/audit PYTHON_TARGETS: python3_11

dev-python/cython PYTHON_TARGETS: python3_11
dev-python/flit-core PYTHON_TARGETS: python3_11
dev-python/gpep517 PYTHON_TARGETS: python3_11
dev-python/installer PYTHON_TARGETS: python3_11
dev-python/jaraco-context PYTHON_TARGETS: python3_11
dev-python/jaraco-functools PYTHON_TARGETS: python3_11
dev-python/jaraco-text PYTHON_TARGETS: python3_11
dev-python/more-itertools PYTHON_TARGETS: python3_11
dev-python/ordered-set PYTHON_TARGETS: python3_11
dev-python/packaging PYTHON_TARGETS: python3_11
dev-python/pip PYTHON_TARGETS: python3_11
dev-python/platformdirs PYTHON_TARGETS: python3_11
dev-python/setuptools PYTHON_TARGETS: python3_11
dev-python/setuptools-scm PYTHON_TARGETS: python3_11
dev-python/wheel PYTHON_TARGETS: python3_11
sys-libs/libselinux PYTHON_TARGETS: python3_11
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 377

PostPosted: Mon Jun 03, 2024 2:15 am    Post subject: Reply with quote

mxh wrote:
SELinux depends on 4 stable ebuilds that are not yet Python 3.12 enabled. These have 16 additional dependencies. It might be better to defer the Python 3.12 upgrade and stay on Python 3.11 until all ebuilds are Python 3.12 enabled. (Or follow the first step of the "safer upgrade procedure" to have both Python 3.11 and 3.12.) For a mostly Python 3.12 system with only these packages and dependencies for Python 3.11, add these to package.use:
Code:
sys-apps/policycoreutils PYTHON_TARGETS: python3_11
sys-apps/selinux-python PYTHON_TARGETS: python3_11
sys-libs/libsemanage PYTHON_TARGETS: python3_11
sys-process/audit PYTHON_TARGETS: python3_11

dev-python/cython PYTHON_TARGETS: python3_11
dev-python/flit-core PYTHON_TARGETS: python3_11
dev-python/gpep517 PYTHON_TARGETS: python3_11
dev-python/installer PYTHON_TARGETS: python3_11
dev-python/jaraco-context PYTHON_TARGETS: python3_11
dev-python/jaraco-functools PYTHON_TARGETS: python3_11
dev-python/jaraco-text PYTHON_TARGETS: python3_11
dev-python/more-itertools PYTHON_TARGETS: python3_11
dev-python/ordered-set PYTHON_TARGETS: python3_11
dev-python/packaging PYTHON_TARGETS: python3_11
dev-python/pip PYTHON_TARGETS: python3_11
dev-python/platformdirs PYTHON_TARGETS: python3_11
dev-python/setuptools PYTHON_TARGETS: python3_11
dev-python/setuptools-scm PYTHON_TARGETS: python3_11
dev-python/wheel PYTHON_TARGETS: python3_11
sys-libs/libselinux PYTHON_TARGETS: python3_11



Thank you mxh for your reply. I did it as you said: created the file below in package.use

Code:

~> cat /etc/portage/package.use/tobedeleted
sys-apps/policycoreutils PYTHON_TARGETS: python3_11
sys-apps/selinux-python PYTHON_TARGETS: python3_11
sys-libs/libsemanage PYTHON_TARGETS: python3_11
sys-process/audit PYTHON_TARGETS: python3_11

dev-python/cython PYTHON_TARGETS: python3_11
dev-python/flit-core PYTHON_TARGETS: python3_11
dev-python/gpep517 PYTHON_TARGETS: python3_11
dev-python/installer PYTHON_TARGETS: python3_11
dev-python/jaraco-context PYTHON_TARGETS: python3_11
dev-python/jaraco-functools PYTHON_TARGETS: python3_11
dev-python/jaraco-text PYTHON_TARGETS: python3_11
dev-python/more-itertools PYTHON_TARGETS: python3_11
dev-python/ordered-set PYTHON_TARGETS: python3_11
dev-python/packaging PYTHON_TARGETS: python3_11
dev-python/pip PYTHON_TARGETS: python3_11
dev-python/platformdirs PYTHON_TARGETS: python3_11
dev-python/setuptools PYTHON_TARGETS: python3_11
dev-python/setuptools-scm PYTHON_TARGETS: python3_11
dev-python/wheel PYTHON_TARGETS: python3_11
sys-libs/libselinux PYTHON_TARGETS: python3_11
~>


but the problem percolated into deluge (a bittorrent tranfer tool)


Code:

~> sudo emerge --ask --update --deep --with-bdeps=y --changed-deps --newuse --changed-use @world

These are the packages that would be merged, in order:

Calculating dependencies /

!!! Problem resolving dependencies for net-p2p/deluge from @selected
... done!
Dependency resolution took 1.29 s (backtrack: 0/20).


!!! The ebuild selected to satisfy "net-p2p/deluge" has unmet requirements.
- net-p2p/deluge-2.1.1-r4::gentoo USE="console gui webinterface -libnotify -sound -test" ABI_X86="(64)" PYTHON_SINGLE_TARGET="-python3_10 -python3_11"

  The following REQUIRED_USE flag constraints are unsatisfied:
    exactly-one-of ( python_single_target_python3_10 python_single_target_python3_11 )

  The above constraints are a subset of the following complete expression:
    libnotify? ( gui ) sound? ( gui ) exactly-one-of ( python_single_target_python3_10 python_single_target_python3_11 )

(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
~>



If I understood the error message correctly, now deluge needs one of the old python versions. However, I tried to add both PYTHON_TARGETS: python3_10 and PYTHON_TARGETS: python3_11 and none worked.
Back to top
View user's profile Send private message
mxh
n00b
n00b


Joined: 03 Jun 2024
Posts: 2

PostPosted: Mon Jun 03, 2024 2:40 am    Post subject: Reply with quote

Maybe your best solution is to defer the Python 3.12 upgrade as described in https://www.gentoo.org/support/news-items/2024-05-09-python3-12.html by adding only this to your package.use:
Code:
*/* PYTHON_TARGETS: -* python3_11
*/* PYTHON_SINGLE_TARGET: -* python3_11

net-p2p/deluge can build against only one version of Python, so it uses PYTHON_SINGLE_TARGET instead of PYTHON_TARGETS. The package.use line for this is:
Code:
net-p2p/deluge PYTHON_SINGLE_TARGET: -* python3_11

But then the problem will percolate into net-p2p/deluge's dependencies and any other ebuilds that are not Python 3.12 enabled.
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 377

PostPosted: Mon Jun 03, 2024 4:06 pm    Post subject: Reply with quote

mxh wrote:
Maybe your best solution is to defer the Python 3.12 upgrade as described in https://www.gentoo.org/support/news-items/2024-05-09-python3-12.html by adding only this to your package.use:
Code:
*/* PYTHON_TARGETS: -* python3_11
*/* PYTHON_SINGLE_TARGET: -* python3_11

net-p2p/deluge can build against only one version of Python, so it uses PYTHON_SINGLE_TARGET instead of PYTHON_TARGETS. The package.use line for this is:
Code:
net-p2p/deluge PYTHON_SINGLE_TARGET: -* python3_11

But then the problem will percolate into net-p2p/deluge's dependencies and any other ebuilds that are not Python 3.12 enabled.




Thank you mxh again for your reply. Just before reading your last reply I had already circunvented the deluge issue, like this:

Code:

~> cat /etc/portage/package.use/tobedeleted
sys-apps/policycoreutils PYTHON_TARGETS: python3_11
sys-apps/selinux-python PYTHON_TARGETS: python3_11
sys-libs/libsemanage PYTHON_TARGETS: python3_11
sys-process/audit PYTHON_TARGETS: python3_11

dev-python/cython PYTHON_TARGETS: python3_11
dev-python/flit-core PYTHON_TARGETS: python3_11
dev-python/gpep517 PYTHON_TARGETS: python3_11
dev-python/installer PYTHON_TARGETS: python3_11
dev-python/jaraco-context PYTHON_TARGETS: python3_11
dev-python/jaraco-functools PYTHON_TARGETS: python3_11
dev-python/jaraco-text PYTHON_TARGETS: python3_11
dev-python/more-itertools PYTHON_TARGETS: python3_11
dev-python/ordered-set PYTHON_TARGETS: python3_11
dev-python/packaging PYTHON_TARGETS: python3_11
dev-python/pip PYTHON_TARGETS: python3_11
dev-python/platformdirs PYTHON_TARGETS: python3_11
dev-python/setuptools PYTHON_TARGETS: python3_11
dev-python/setuptools-scm PYTHON_TARGETS: python3_11
dev-python/wheel PYTHON_TARGETS: python3_11
sys-libs/libselinux PYTHON_TARGETS: python3_11
net-p2p/deluge python_single_target_python3_11
net-print/hplip python_single_target_python3_11
~>



However, it gets messy, as you may see here. The last lines are:


Code:

It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.


The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by dev-python/twisted-24.3.0::gentoo
# required by net-p2p/deluge-2.1.1-r4::gentoo[python_single_target_python3_11]
# required by @selected
# required by @world (argument)
>=dev-python/zope-interface-6.4_p2 python_targets_python3_11
# required by net-p2p/deluge-2.1.1-r4::gentoo[python_single_target_python3_11]
# required by @selected
# required by @world (argument)
>=dev-python/mako-1.3.5 python_targets_python3_11
# required by dev-python/mako-1.3.5::gentoo
# required by media-libs/mesa-24.0.7::gentoo
# required by media-video/mpv-0.38.0::gentoo[egl,drm]
# required by @selected
# required by @world (argument)
>=dev-python/markupsafe-2.1.5 python_targets_python3_11
# required by dev-python/hatchling-1.24.2::gentoo[-test]
# required by dev-python/attrs-23.2.0::gentoo
# required by dev-python/automat-22.10.0::gentoo
# required by dev-python/twisted-24.3.0::gentoo
# required by net-p2p/deluge-2.1.1-r4::gentoo[python_single_target_python3_11]
# required by @selected
# required by @world (argument)
>=dev-python/trove-classifiers-2024.5.22 python_targets_python3_11

Would you like to add these changes to your config files? [Yes/No] ^\Sair


Is it safe to add all those exceptions? Thank you again for your help.
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 377

PostPosted: Tue Jun 04, 2024 1:23 am    Post subject: Reply with quote

I took a chance and just hit YES. There where multiple other packages with similar limitations, and multiple interactions between etc-update and @world update were necessary until the update could eventually occurr. And the funny thing: today, just after concluding the update, I ran @world update again and this time deluge demanded a choice between python 11 and python '12!
Back to top
View user's profile Send private message
toon
n00b
n00b


Joined: 26 Jan 2003
Posts: 69
Location: The Netherlands

PostPosted: Wed Jun 05, 2024 12:45 pm    Post subject: Problem not solved yet Reply with quote

The label [SOLVED] in the subject is a bit confusing.
The root cause of the problem is that the ebuild of policycoreutils-3.6 does not allow python 3.12 yet.
This was kinda fixed in git the day before yesterday, but that fix was reversed one hour later.
The ticket concering this problem has been reopened.

https://bugs.gentoo.org/932011
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 377

PostPosted: Wed Jun 05, 2024 1:52 pm    Post subject: Re: Problem not solved yet Reply with quote

toon wrote:
The label [SOLVED] in the subject is a bit confusing.
The root cause of the problem is that the ebuild of policycoreutils-3.6 does not allow python 3.12 yet.
This was kinda fixed in git the day before yesterday, but that fix was reversed one hour later.
The ticket concering this problem has been reopened.

https://bugs.gentoo.org/932011



I consider it SOLVED because my problem was in practice resolved: I was blocked from running @world updates, and limiting the python version in a dozen of packages (my initial issue was with policecoreutils, but as I wrote after and also considering the current state of the section Portage & Programming, the number of packages is not small) allowed me to do it. But I get your point and see no problem in removing the SOLVED label.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum