View previous topic :: View next topic |
Author |
Message |
lukascobber n00b
Joined: 28 Oct 2021 Posts: 4
|
Posted: Thu Oct 28, 2021 6:43 pm Post subject: Why are some USE flag necessary? |
|
|
Hello,
I seem to be having a misunderstanding about some USE flag feature. I understand global and local USE flags and that they build support for some feature.
What I am not understanding is why are some USE flags necessary? For example, when I am trying to emerge LibreOffice
needs to explicitly have set as a USE flag.
Is this due to some other USE flag (or profile) disabling in somewhere?
Another question, if it's needed for the emerge to work, why isn't it automatically applied?
Thanks for any help in advance. _________________ Gentoo is awesome |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30842 Location: here
|
Posted: Thu Oct 28, 2021 7:01 pm Post subject: |
|
|
Welcome to gentoo forum!
The sys-devel/xmlsec package with nss use flag is required by libreoffice, and in a desktop profile is enabled by default
/var/db/repos/gentoo/profiles/targets/desktop/package.use: | ...
# Andreas Sturmlechner <asturm@gentoo.org> (2018-06-09)
# Required by app-office/libreoffice
dev-libs/xmlsec nss
... |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3875
|
Posted: Thu Oct 28, 2021 7:11 pm Post subject: |
|
|
As fedeliallalinea pointed out this file mandates the use of "nss" for xmlsec.
Furthermore if you look at the ebuild https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/xmlsec/xmlsec-1.2.32.ebuild you will see
Code: |
IUSE="doc gcrypt gnutls nss +openssl static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="|| ( gcrypt gnutls nss openssl )
gnutls? ( gcrypt )"
|
Plz do note the "+openssl" flag in IUSE variable.
IUSE contains the available USE flags for a particular package.
In this case the only by-default turned on --based on the ebuild-- is "+openssl"
But in this particular package for Desktop profiles the Gentoo developers deemed it necessary to also include "+nss" _________________
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Thu Oct 28, 2021 7:59 pm Post subject: Re: Why are some USE flag necessary? |
|
|
lukascobber wrote: | Another question, if it's needed for the emerge to work, why isn't it automatically applied? | In some cases, you may prefer to solve the problem another way. You might decide not to install the initial package, or to try to change the USE on that package to remove the dependency that Portage has reported.
If you really want to go ahead with the default, you can have Portage automatically generate the required change. Then, you review it using etc-update or similarm and make it active. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54119 Location: 56N 3W
|
Posted: Thu Oct 28, 2021 8:08 pm Post subject: |
|
|
lukascobber,
Welcome to Gentoo.
Gentoo isn't a distro. Its a toolkit that you use to design and build your own distro user the Portage package manager and the ::gentoo repo.
Its your design decision if you want sys-devel/xmlsec with USE=nss or to drop libreoffice from your design.
Portage can't make that decision for you.
When you install a binary distro, that decision is made for you.
Your question indicates that you may have chosen the wrong profile for your intended use case. Choosing the right profile is a good start.
It may not be that simple either.
Tell use what you want to do with your Gentoo and post the output of
That will tell us your settings. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
lukascobber n00b
Joined: 28 Oct 2021 Posts: 4
|
Posted: Thu Oct 28, 2021 9:37 pm Post subject: |
|
|
fedeliallalinea wrote: | Welcome to gentoo forum!
The sys-devel/xmlsec package with nss use flag is required by libreoffice, and in a desktop profile is enabled by default
/var/db/repos/gentoo/profiles/targets/desktop/package.use: | ...
# Andreas Sturmlechner <asturm@gentoo.org> (2018-06-09)
# Required by app-office/libreoffice
dev-libs/xmlsec nss
... |
|
So, some packages will have USE flags decided by the profile specifically. Understandable.
alamahant wrote: | As fedeliallalinea pointed out this file mandates the use of "nss" for xmlsec.
Furthermore if you look at the ebuild https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/xmlsec/xmlsec-1.2.32.ebuild you will see
Code: |
IUSE="doc gcrypt gnutls nss +openssl static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="|| ( gcrypt gnutls nss openssl )
gnutls? ( gcrypt )"
|
Plz do note the "+openssl" flag in IUSE variable.
IUSE contains the available USE flags for a particular package.
In this case the only by-default turned on --based on the ebuild-- is "+openssl"
But in this particular package for Desktop profiles the Gentoo developers deemed it necessary to also include "+nss" |
This makes even more sense, great explanation.
Hu wrote: | lukascobber wrote: | Another question, if it's needed for the emerge to work, why isn't it automatically applied? | In some cases, you may prefer to solve the problem another way. You might decide not to install the initial package, or to try to change the USE on that package to remove the dependency that Portage has reported.
If you really want to go ahead with the default, you can have Portage automatically generate the required change. Then, you review it using etc-update or similarm and make it active. |
I am not sure if editing the ebuild, where the USE flag is set is safe for the package, if that's what you meant.
NeddySeagoon wrote: | lukascobber,
Welcome to Gentoo.
Gentoo isn't a distro. Its a toolkit that you use to design and build your own distro user the Portage package manager and the ::gentoo repo.
Its your design decision if you want sys-devel/xmlsec with USE=nss or to drop libreoffice from your design.
Portage can't make that decision for you.
When you install a binary distro, that decision is made for you.
Your question indicates that you may have chosen the wrong profile for your intended use case. Choosing the right profile is a good start.
It may not be that simple either.
Tell use what you want to do with your Gentoo and post the output of
That will tell us your settings. |
I understand the principles behind Gentoo and that's why I really like it. The only thing for now that is bugging me is this USE flag strangeness. But not anymore as the answers everyone gave me explain a lot. Though I still can't understand how can I build libreoffice without that USE flag, safely or that may be an impossibility?
Thank you everyone for your time. _________________ Gentoo is awesome |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Thu Oct 28, 2021 9:50 pm Post subject: |
|
|
lukascobber wrote: | I am not sure if editing the ebuild, where the USE flag is set is safe for the package, if that's what you meant. | That is not what I meant. That would be a modification of the IUSE, or the REQUIRED_USE, or a DEPEND/RDEPEND. I meant that you could change, via package.use, what options you enable/disable on the source package, in order to change what (if any) requirements you need to satisfy on the supporting package. It may confuse matters that, in this case, you cannot solve your problem this way. libreoffice hard-requires that you enable USE=nss on xmlsec, so your only choices are to not use libreoffice or to do as Portage requests. In some cases, the dependency would be optional and controlled via a USE flag on the source package, so it could be avoided by a USE change. For example, if xmlsec were only needed for printing paper documents, and you had no need of that, you could change USE to drop printing support, and thereby drop xmlsec. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54119 Location: 56N 3W
|
Posted: Thu Oct 28, 2021 9:54 pm Post subject: |
|
|
lukascobber,
It may be possible to build libreoffice the way you want to but it would not be supported by Gentoo.
You would need to copy the ebuild to your overlay and edit it there.
All sorts of things could happen.
The build may fail, possibly because the package cannot be linked.
Some functionality may be lost. That may be acceptable to you.
The program may crash at runtime.
The program may produce hard to detect incorrect output.
That's the sort of thing your local overlay is for. Its not wrong. Gentoo makes it fairly easy to do too.
It's just not officially supported.
You can design your install however you like. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
lukascobber n00b
Joined: 28 Oct 2021 Posts: 4
|
Posted: Thu Oct 28, 2021 10:09 pm Post subject: |
|
|
Hu wrote: | lukascobber wrote: | I am not sure if editing the ebuild, where the USE flag is set is safe for the package, if that's what you meant. | That is not what I meant. That would be a modification of the IUSE, or the REQUIRED_USE, or a DEPEND/RDEPEND. I meant that you could change, via package.use, what options you enable/disable on the source package, in order to change what (if any) requirements you need to satisfy on the supporting package. It may confuse matters that, in this case, you cannot solve your problem this way. libreoffice hard-requires that you enable USE=nss on xmlsec, so your only choices are to not use libreoffice or to do as Portage requests. In some cases, the dependency would be optional and controlled via a USE flag on the source package, so it could be avoided by a USE change. For example, if xmlsec were only needed for printing paper documents, and you had no need of that, you could change USE to drop printing support, and thereby drop xmlsec. |
Yeah, now it all ties into my understanding. Again, thank you very much _________________ Gentoo is awesome |
|
Back to top |
|
|
lukascobber n00b
Joined: 28 Oct 2021 Posts: 4
|
Posted: Thu Oct 28, 2021 10:13 pm Post subject: |
|
|
NeddySeagoon wrote: | lukascobber,
It may be possible to build libreoffice the way you want to but it would not be supported by Gentoo.
You would need to copy the ebuild to your overlay and edit it there.
All sorts of things could happen.
The build may fail, possibly because the package cannot be linked.
Some functionality may be lost. That may be acceptable to you.
The program may crash at runtime.
The program may produce hard to detect incorrect output.
That's the sort of thing your local overlay is for. Its not wrong. Gentoo makes it fairly easy to do too.
It's just not officially supported.
You can design your install however you like. |
This is even more customization then I initially imagined with Gentoo. It's incredible actually. Thank you for this info _________________ Gentoo is awesome |
|
Back to top |
|
|
|
|
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
|
|