Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Confused by REQUIRED_USE & PYTHON_SINGLE_TARGETS flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Vorlon
Apprentice
Apprentice


Joined: 16 May 2003
Posts: 229
Location: West Grove, PA

PostPosted: Sun Mar 13, 2016 6:43 pm    Post subject: Confused by REQUIRED_USE & PYTHON_SINGLE_TARGETS flags Reply with quote

I'm confused by the "REQUIRED_USE" and the PYTHON_REQUIRED_USE flags. I understand the regular USE flag system, but how is a REQUIRED_USE different? How is it set?


I got a message about using these 2 items when trying to build libreoffice on an ~AMD64 system. I think I understand the python flags after reading the python flags wicki (https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS), but I can't find anything about the REQUIRED_USE flag.


Can somebody point me to a document about it, or give me a brief explanation of how it is used?


TIA!
_________________
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 13, 2016 8:40 pm    Post subject: Re: Confused by REQUIRED_USE & PYTHON_SINGLE_TARGETS fla Reply with quote

Vorlon wrote:
Can somebody point me to a document about it, or give me a brief explanation of how it is used?

Vorlon ... see ~portdir/eclass/python-r1.eclass

python-r1.eclass:
# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE
# @DESCRIPTION:
# This is an eclass-generated required-use expression which ensures at
# least one Python implementation has been enabled.
#
# This expression should be utilized in an ebuild by including it in
# REQUIRED_USE, optionally behind a use flag.
#
# Example use:
# @CODE
# REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# @CODE
#
# Example value:
# @CODE
# || ( python_targets_python2_7 python_targets_python3_4 )
# @CODE

As for REQUIRED_USE, it functions the same but is non-python specific, so you'll see the likes of the following:

mysql-multilib.eclass:
REQUIRED_USE="${REQUIRED_USE} !server? ( !oqgraph !sphinx ) tokudb? ( jemalloc )"

Does that answer your question?

best ... khay
Back to top
View user's profile Send private message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 656

PostPosted: Mon Mar 21, 2016 3:41 am    Post subject: Reply with quote

I had this problem with earlier libreoffice ebuilds, and resolved by making the entry in package.use:
Code:
% grep libreoffice /etc/portage/package.use
app-office/libreoffice python_single_target_python3_5 -graphite -gstreamer -mysql -opengl -vba -webdav -postgres

With the recent version bump to app-office/libreoffice-5.1.1.3::gentoo, this no longer worked:
Code:
% sudo emerge libreoffice -pv
!!! The ebuild selected to satisfy "libreoffice" has unmet requirements.
app-office/libreoffice-5.1.1.3::gentoo USE="branding dbus gtk gtk3 jemalloc
(-aqua) -bluetooth -coinmp -collada -cups -debug -eds (-firebird) -gltf -gnome
-gstreamer -java -kde -libressl -mysql -odk -postgres (-telepathy) -test -vlc"

ABI_X86="64"

LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript
-wiki-publisher"

PYTHON_SINGLE_TARGET="python2_7 python3_5 -python3_4"
PYTHON_TARGETS="python2_7 python3_5 -python3_4"

The following REQUIRED_USE flag constraints are unsatisfied:

exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4
python_single_target_python3_5 )

The above constraints are a subset of the following complete expression:

exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4
python_single_target_python3_5 ) python_single_target_python2_7? (
python_targets_python2_7 ) python_single_target_python3_4? (
python_targets_python3_4 ) python_single_target_python3_5? (
python_targets_python3_5 ) bluetooth? ( dbus ) collada? ( gltf ) eds? ( gnome )
gnome? ( gtk ) telepathy? ( gtk ) libreoffice_extensions_nlpsolver? ( java )
libreoffice_extensions_scripting-beanshell? ( java )
libreoffice_extensions_scripting-javascript? ( java )
libreoffice_extensions_wiki-publisher? ( java )
Code:
% grep python /etc/portage/make.conf
PYTHON_TARGETS="python2_7 python3_5"

Any insights as to what is different with (portage's deps calculation of) the current ebuild version to previous?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5767

PostPosted: Mon Mar 21, 2016 1:39 pm    Post subject: Reply with quote

PYTHON_SINGLE_TARGET, as the name implies, requires a single target, and you've added a second one.
Back to top
View user's profile Send private message
baaann
Guru
Guru


Joined: 23 Jan 2006
Posts: 548
Location: uk

PostPosted: Tue Mar 22, 2016 8:33 am    Post subject: Reply with quote

Ant P. wrote:
PYTHON_SINGLE_TARGET, as the name implies, requires a single target, and you've added a second one.


The question is, why does it default to 2.7?

I am seeing the same issue and have added -python_single_target_python2_7 to libreoffice in /etc/portage/package.use
From the example above
Code:
app-office/libreoffice python_single_target_python3_5 -graphite -gstreamer -mysql -opengl -vba -webdav -postgres -python_single_target_python2_7


Just starting the update, so it will be a while before I can confirm its ok
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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