Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I make dispatch-conf respect existing package.use...
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
leyvi
Apprentice
Apprentice


Joined: 08 Sep 2023
Posts: 167

PostPosted: Tue Mar 04, 2025 3:32 pm    Post subject: How do I make dispatch-conf respect existing package.use... Reply with quote

How do I make dispatch-conf merge configuration updates with my existing files in package.use?
I have package.use layed out such that every package has its own file; for example (package.use/curl):
Code:
net-misc/curl   websockets http3 brotli http2 quic
When it turns out that curl (or whichever package) needs its USE flags changed, I want it to look for a file that already contains the package atom, and if it finds it, merges the configuration update into that file, instead of picking the same file for every update (for some reason, it's been using package.use/xz-utils). I looked, but I couldn't find anything about this on the dispatch-conf man pages. Anyone know of a solution?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23149

PostPosted: Tue Mar 04, 2025 4:12 pm    Post subject: Reply with quote

Portage always proposes the additions to be in the lexicographically last file. For you, xz-utils sorts last, so that is where updates are sent. If you had a zz-myflags, they would go there instead.

I am not aware of a way to get the behavior you want, but I will note that dispatch-conf is just passing through Portage's pattern of using the last file. If your problem can be solved, it will be through changing the behavior of autounmask, not dispatch-conf. Alternatively, you could stop using autounmask-write, and put the flags where you want them by hand.
Back to top
View user's profile Send private message
leyvi
Apprentice
Apprentice


Joined: 08 Sep 2023
Posts: 167

PostPosted: Tue Mar 04, 2025 5:13 pm    Post subject: Reply with quote

Thanks Hu. I'll check out autounmask.
Back to top
View user's profile Send private message
leyvi
Apprentice
Apprentice


Joined: 08 Sep 2023
Posts: 167

PostPosted: Tue Mar 04, 2025 5:17 pm    Post subject: Reply with quote

Yeah, I don't see a way to do this the way I want. The stuff you mentioned is all there is.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2789

PostPosted: Tue Mar 04, 2025 6:06 pm    Post subject: Reply with quote

Portage will create a ._0000<something>.cfg. That something will be the last file in package.use in lexicographical order.

Code:
cat <that file> >> <the desired file> && rm <that file>

No dispatch-conf necessary.

Best Regards,
Georgi
Back to top
View user's profile Send private message
leyvi
Apprentice
Apprentice


Joined: 08 Sep 2023
Posts: 167

PostPosted: Tue Mar 04, 2025 7:13 pm    Post subject: Reply with quote

logrusx wrote:
Portage will create a ._0000<something>.cfg. That something will be the last file in package.use in lexicographical order.

Code:
cat <that file> >> <the desired file> && rm <that file>

No dispatch-conf necessary.

Best Regards,
Georgi
Alright. That's a bit more painful than running dispatch-conf, but it's a whole lot less painful than doing it manually. Thanks logrusx!
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