Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can someone please explain "Atom USE defaults"?
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
PF4Public
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2019
Posts: 104

PostPosted: Fri Sep 06, 2019 3:36 pm    Post subject: Can someone please explain "Atom USE defaults"? Reply with quote

I've tried googling and reading the man pages, but I still cannot make sense of it.

Man says: "Use (+) to behave as if a missing flag is present and enabled, or (-) to behave as if it is present and disabled". What does this sentence mean? What does behave imply? I just don't get it :(

For example, "cndrvcups-lb-3.60-r2.ebuild" has this dependence: ">=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]". Does it need that 'dev-libs/libxml2' be built with ABi 32? Is it optional? Is it ignored? Or does this dependence say us: "please rebuild 'dev-libs/libxml2' with ABi 32"? Or...?

Thanks in advance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54473
Location: 56N 3W

PostPosted: Fri Sep 06, 2019 3:59 pm    Post subject: Reply with quote

alamahant,

cndrvcups-lb-3.60-r2.ebuild:
RDEPEND="
        >=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]


cndrvcups-lb-3.60-r2 has a runtime dependency on the 64 bit version of >=dev-libs/libxml2-2.9.1-r4.
If something else already installed needs >=dev-libs/libxml2-2.9.1-r4[abi_x86_32(+)]that's fine.
As they are different ABIs they install in different locations.

There are two common ABIs on amd64, abi_x86_32 and abi_x86_64. Packages that provide both can have neither installed , either one or both installed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
PF4Public
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2019
Posts: 104

PostPosted: Fri Sep 06, 2019 6:57 pm    Post subject: Reply with quote

NeddySeagoon,

Thank you for your fast reply.
I still don't get it. Why do we need these (-) and (+)? Couldn't a package simply depend on exactly '>=dev-libs/libxml2-2.9.1-r4[abi_x86_64]' then? If it doesn't care for 'abi_x86_32'.
It looks so simple, but I still cannot wrap my head around it…
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4635
Location: Germany

PostPosted: Fri Sep 06, 2019 10:05 pm    Post subject: Reply with quote

Hi,

[abi_x86_32(-)] means, the flag must exist and be activated
[abi_x86_32(+)] means, the flag must be activated, if it exists
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21948

PostPosted: Sat Sep 07, 2019 4:18 am    Post subject: Reply with quote

We need the (-) / (+) forms for cases where some versions of the package lack the flag, and the package manager needs to know whether that version acts like the flag was disabled or like the flag was enabled.
Back to top
View user's profile Send private message
PF4Public
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2019
Posts: 104

PostPosted: Mon Sep 09, 2019 9:21 pm    Post subject: Reply with quote

NeddySeagoon wrote:

cndrvcups-lb-3.60-r2 has a runtime dependency on the 64 bit version of >=dev-libs/libxml2-2.9.1-r4.


Josef.95 wrote:
Hi,

[abi_x86_32(-)] means, the flag must exist and be activated
[abi_x86_32(+)] means, the flag must be activated, if it exists


Hi, Josef.95
But your statement contradicts to what NeddySeagoon said!


Hu wrote:
We need the (-) / (+) forms for cases where some versions of the package lack the flag, and the package manager needs to know whether that version acts like the flag was disabled or like the flag was enabled.

Package manager needs to know which "version acts like the flag was disabled or like the flag was enabled"? The package I'm trying to install or the library it depends on?

So, taking again that very example: ">=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]" what does this mean? What does this say to the package manager?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1573
Location: South America

PostPosted: Mon Sep 09, 2019 9:48 pm    Post subject: Reply with quote

PF4Public wrote:
So, taking again that very example: ">=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]" what does this mean? What does this say to the package manager?

It means:
  • dev-libs/libxml2 version 2.9.1 revision 4 or later is required, with the abi_x86_32 USE flag set.
  • If the package does not support the abi_x86_32 USE flag, pretend that it does, and pretend that the flag is unset (failing the dependency specification in this case).
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3415
Location: Rasi, Finland

PostPosted: Mon Sep 09, 2019 9:56 pm    Post subject: Reply with quote

GDH-gentoo wrote:
  • If the package does not support the abi_x86_32 USE flag, pretend that it does, and pretend that the flag is unset (failing the dependency specification in this case).
I think replacing word "pretend" with "assume" makes it more clear what's going on.

I've also been wondering what those +'s and -'s do there. Now I do.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1573
Location: South America

PostPosted: Mon Sep 09, 2019 10:02 pm    Post subject: Reply with quote

By the way, by "the package" in that second bullet, I mean dev-libs/libxml2.
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4635
Location: Germany

PostPosted: Mon Sep 09, 2019 10:28 pm    Post subject: Reply with quote

I think the emerge output is pretty clear :)
Code:
 # emerge -pv cndrvcups-lb

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

Calculating dependencies... done!

emerge: there are no ebuilds built with USE flags to satisfy ">=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]".
!!! One of the following packages is required to complete your request:
- dev-libs/libxml2-2.9.9-r1::gentoo (Change USE: +abi_x86_32)
(dependency required by "net-print/cndrvcups-lb-3.60-r2::gentoo" [ebuild])
(dependency required by "cndrvcups-lb" [argument])
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