Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do you manage package.accepted_keywords and .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
alaurie
n00b
n00b


Joined: 17 Jul 2023
Posts: 10

PostPosted: Wed Aug 02, 2023 2:52 am    Post subject: How do you manage package.accepted_keywords and .use? Reply with quote

Whats the general consensus on how that should be laid out? Currently I have one file per application e.g.

Code:
/etc/portage/package.accepted_keywords/ffmpeg
/etc/portage/package.accepted_keywords/insync


and so on, I do the same with .use as well. One file per application. Should I just create the one file for accepted and use and add multiple lines for each app? Or is what I am doing fine.
Back to top
View user's profile Send private message
rab0171610
Guru
Guru


Joined: 24 Dec 2022
Posts: 348

PostPosted: Wed Aug 02, 2023 3:16 am    Post subject: Reply with quote

I have one file for each type (package.use, package.mask, etc) For example, /etc/portage/package.accept_keywords/package.accept_keywords .
I also have a symlink to each file in /etc so I can quickly edit from command line (ex. /etc/make.conf >> /etc/portage/make.conf, /etc/package.use >> /etc/portage/package.use/package.use )
I think most prefer individual files named after package atom. You can do what works for you.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Wed Aug 02, 2023 4:45 am    Post subject: Reply with quote

Quote:

How do you manage package.accepted_keywords and .use?


According to one's preference and organization style.

Best Regards,
Georgi
Back to top
View user's profile Send private message
alaurie
n00b
n00b


Joined: 17 Jul 2023
Posts: 10

PostPosted: Wed Aug 02, 2023 4:56 am    Post subject: Reply with quote

okay thanks all. What I am doing was working for me, just wanted to make sure it wasn't something that was going to bite me later on down the line.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1744

PostPosted: Wed Aug 02, 2023 1:08 pm    Post subject: Reply with quote

Just be aware that these files are read alphabetically and can overwrite each other as they are read in.

This is particularly noticeable with the package.use files when a certain package is listed in multiple files turning on and off a certain flag.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Wed Aug 02, 2023 3:09 pm    Post subject: Reply with quote

One other caveat, which should not be an issue for OP: some tools, such as crossdev, require that you use the directory model, so that the tool can claim a specific filename in that directory for its exclusive use. Using a file for /etc/portage/package.type causes such tools to refuse to proceed.
Back to top
View user's profile Send private message
Irets
Apprentice
Apprentice


Joined: 17 Dec 2019
Posts: 224

PostPosted: Wed Aug 02, 2023 8:25 pm    Post subject: Reply with quote

On my system I have package.use as a folder and within it I have multiple text files defining different flags for packages.
Code:
irets@navi /etc/portage $ ls package.use/
battlenet      clang       dxvk               firefox     glibc  imagemagick      libsdl2         llvm  mumble  ntfs3g          openssh     shntool               tumbler     wines    zz-autounmask
cataclysm-dda  curl        ffmpeg             gdk-pixbuf  grub   intel-microcode  libusb          mono  nano    nvidia-drivers  pulseaudio  simplescreenrecorder  vim         wxgtk
clamav         dolphinemu  ffmpegthumbnailer  git         gvfs   libreoffice      linux-firmware  mpv   netpbm  openal          qtgui       thunar                webkit-gtk  zathura

I also have my own "USE group" for Battlenet launcher via wine.
Code:
irets@navi /etc/portage $ cat package.use/battlenet
dev-libs/libgpg-error abi_x86_32
sys-libs/readline abi_x86_32
app-crypt/p11-kit abi_x86_32
dev-libs/libusb abi_x86_32
dev-db/sqlite abi_x86_32

I have a similiar group for dependencies of Wine.
Code:
irets@navi /etc/portage $ cat package.use/wines
app-emulation/wine-gecko -shared
app-emulation/wine-mono -shared

package.accept_keywords is a text file.
I would have also taken the same path with package.accept_keywords as with package.use but as a Gentoo newbie, I didn't know any better.
Still, both ways are just as viable and you should choose the way which works the best for you.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Thu Aug 03, 2023 4:30 pm    Post subject: Reply with quote

I just found out package.use and package.accept_keywords could contain directories!

Best Regards,
Georgi
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