Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sys-apps/yarn is soft blocking net-libs/nodejs
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
GraviDDD
n00b
n00b


Joined: 08 Sep 2024
Posts: 3

PostPosted: Sun Sep 08, 2024 1:37 am    Post subject: [SOLVED] sys-apps/yarn is soft blocking net-libs/nodejs Reply with quote

Portage seems convinced that I can't have yarn and nodejs installed on the same system. This seems wrong to me given that yarn is a part of the nodejs ecosystem, but I'm new enough to gentoo that I'm having trouble figuring out the root cause here. Any pointers or breadcrumbs would be much appreciated.

Code:

$ emerge -apv yarn

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

Calculating dependencies... done!
Dependency resolution took 1.97 s (backtrack: 0/20).

[ebuild  N     ] sys-apps/yarn-1.22.22::gentoo  1,219 KiB
[blocks B      ] sys-apps/yarn ("sys-apps/yarn" is soft blocking net-libs/nodejs-22.4.1-r1)

Total: 1 package (1 new), Size of downloads: 1,219 KiB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-apps/yarn-1.22.22:0/0::gentoo, ebuild scheduled for merge) pulled in by
    yarn


Last edited by GraviDDD on Sun Sep 08, 2024 5:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22619

PostPosted: Sun Sep 08, 2024 2:11 am    Post subject: Reply with quote

Welcome to the forums.

As I read the ebuild, nodejs with USE=corepack blocks yarn. If you set USE=-corepack, the blocker will go away. I cannot say whether the functionality removed by choosing USE=-corepack will matter to you.
Back to top
View user's profile Send private message
GraviDDD
n00b
n00b


Joined: 08 Sep 2024
Posts: 3

PostPosted: Sun Sep 08, 2024 4:39 pm    Post subject: Reply with quote

That worked, thanks!

(Note to self/other beginners: If one package blocks another, check the corresponding `.ebuild` file (found in `/var/db/repos/gentoo/`) for the source of the block. In my case, the block was specified in the RDEPEND section.)

Hu, are there any other tricks I should know about? Was there some invocation of portage that I could have used to get it to tell me that was the use flag that caused the block?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22619

PostPosted: Sun Sep 08, 2024 4:50 pm    Post subject: Reply with quote

I am not aware of a way to make Portage show this. You already used --verbose, and if anything would have made it volunteer that information, I would have expected --verbose to do it. It didn't. Perhaps someone more familiar with Portage behavior will have a better answer for you.

Although I read the ebuild to get an answer for you, in more complex cases, the blocking relation might be hidden in an eclass that the ebuild includes, or be generated by execution of some text processing, so reading the ebuild is not always a sufficient answer. You may get better results consulting /var/cache/edb/dep/var/db/repos/gentoo/net-libs/nodejs-22.4.1-r1 (or equivalent), but this appears to be generated by Portage only after dependency resolution. Additionally, since it is primarily for machine consumption, the formatting is a bit harder to read, and any comments in the ebuild explaining why blocks were added are not present in the edb file. Regardless, whether you read the ebuild or the edb, you will need some basic proficiency with the ebuild DEPEND syntax to make sense of the tokens. See man 5 ebuild for more than you probably want to know. Start with the section Dynamic dependencies, although everything under the outer heading Dependencies will likely be useful to you eventually.
Back to top
View user's profile Send private message
GraviDDD
n00b
n00b


Joined: 08 Sep 2024
Posts: 3

PostPosted: Sun Sep 08, 2024 5:08 pm    Post subject: Reply with quote

Thank you!
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