View previous topic :: View next topic |
Author |
Message |
johngalt Apprentice
Joined: 09 Sep 2004 Posts: 258 Location: 3rd Rock
|
Posted: Fri Jun 29, 2018 5:40 pm Post subject: [SOLVED] /etc/portage/package.use/ - 1 file or many? |
|
|
Hi, all,
I'm configuring Gentoo on my desktop (clean install) for lvm and non-EFI boot (BIOS based machine). I've run into messages thus far that have me make USE flag exceptions in /etc/portage/package.use/ - as such I've been making each one as a separate file, usuailly using the short pakcage name as the file name and putting the full pakcage name and USE flag inside that file e.g. for >={family}/foo="{USEflag} I do `nano -w /etc/portage/package.use/foo' and inside I put in Code: | {family}/foo {USEflag} | - and it seems to have worked fine thus far.
In looking at the LVM wiki, though, it mentions putting the one exception USE flag for grub2 into /etc/portage/package.use/package.use via an echo, as such Code: | echo 'sys-boot/grub:2 device-mapper' >> /etc/portage/package.use/package.use | - so, should I use that one file for all of my USE file exceptions, instead of individual files for each package?
I'm trying to find where I originally came across the single file method I'm using now - I think it was in one of the stub articles, where it ssaid to make a file if /etc/portage/package.use/ was a pre-existing directory instead of being a file like /etc/portage/package.use...
Or, does it matter at all? _________________
desultory wrote: | If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior. |
Amen.
Last edited by johngalt on Fri Jun 29, 2018 5:48 pm; edited 1 time in total |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Fri Jun 29, 2018 5:45 pm Post subject: |
|
|
It's purely personal preference, documented in "man portage": Quote: | /etc/portage/
Files in this directory including make.conf, repos.conf, and any file with a name that begins with "package." can be more than just a flat file. If it is a directory, then all the files in that directory will be sorted in ascending alphabetical order by file name and summed together as if it were a single file. | - John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
johngalt Apprentice
Joined: 09 Sep 2004 Posts: 258 Location: 3rd Rock
|
Posted: Fri Jun 29, 2018 5:48 pm Post subject: |
|
|
Ahhh. OK, that makes sense. I was thinknig along completley differnet lines when I read that line last week - now, taken in context of what I am doing, it imakes sense.
I suppose to make it a lot easier to deal with, I should probably put it all in a single file - at least that is my preference - being able to see it all at one time.
Thanks, John. _________________
desultory wrote: | If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior. |
Amen. |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Jun 29, 2018 6:18 pm Post subject: |
|
|
Once you get used to using files inside the /etc/portage/package.use/ directory instead of declaring everything in a single file /etc/portage/package.use or (/etc/portage/package.use/package.use), it's not such a bad way of doing things and can be quite helpful sometimes. You can create files with whatever name you want, and declare whatever packages you want inside them, bearing in mind the ascending alphabetical order of the filenames, of course. The only thing to watch out for is declaring the same package in more than one file, but I don't find that an issue really. After all it's not a big deal to check. For example:
Code: | $ grep thunderbird /etc/portage/package.use/*
/etc/portage/package.use/thunderbird:mail-client/thunderbird lightning
/etc/portage/package.use/world:# required by mail-client/thunderbird-31.7.0::gentoo
/etc/portage/package.use/world:# required by mail-client/thunderbird-45.1.0::gentoo |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1972
|
Posted: Sat Jun 30, 2018 9:40 am Post subject: |
|
|
I've two machines, a desktop which is also a BINHOST, and a laptop that gets most of its packages from the desktop. The desktop has package.use/01use; the laptop rsync's that file (and other bits of /etc/portage) when it emerge --sync's, and has overrides in package.use/02use. _________________ Greybeard |
|
Back to top |
|
|
johngalt Apprentice
Joined: 09 Sep 2004 Posts: 258 Location: 3rd Rock
|
Posted: Sun Jul 01, 2018 5:09 am Post subject: |
|
|
@Fitzcarraldo - Thanks for the advice - I'm configuring 3 different machines, 1 Dell laptop (Celeron 1007u CPU-based), 1 Lenovo laptop (AMD A6-5350M CPU based), and my desktop, which currently it an old Core i7 965 EE based machine on an eVGA X58 mobo using BIOS. So, at least for the beginning configuration parts, I'm trying to keep as much uniformity between the three as possible - making setup a lot easier. Add to that the fact that the Dell is truly headless (cut SRCD auto finds the wired connection, so all I have to do is set root pw and assign it to a screen, and then I do everything else form he desktop SSH into it) - and it gets to be a nightmare.
I originally had them in separate files, but concatenated them into one - now, I'm beginning to see how it would have been better for me to keep them separate, just for the sake of keeping everything sane for me (in that 1 long list is a lot easier to miss something than a list of files with a single setting in each, at least for me).
It's not the end of the world - I'm only looking at about 12-15 right now, so it is easy enough to separate them back.
Th alphabetized filenames for individual file use - is that of any sort of significance? My gut says that I'll just need to be careful in case something needs to be loaded prior to another item - but my gut also says that it seems more logical that portage loads everything in the directory every time an emerge is called, so I'm confused....
@Goverp - After I get my head wrapped around everything I want to set up on all three machines, and get the Dell's screen replaced, I might (possibly) look into that - after all, 1 download from the web and serving everything else via local network certainly is a better strategy. Of course, that is not within my purview right now - I'm basically a n00b who just has no fear - and is willing to do things the wrong way to figure out why they are considered the wrong way lol.
I'm assuming that the way that works is that you have a combined list of packages and such from both machines, and that is all that you actually keep up to date, correct? (I mean, my gut tells me that you're not harboring all 19K+ packages lol). Sounds like an interesting concept. _________________
desultory wrote: | If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior. |
Amen. |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
Posted: Sun Jul 01, 2018 3:51 pm Post subject: |
|
|
John R. Graham wrote: | It's purely personal preference, documented in "man portage": Quote: | /etc/portage/
Files in this directory including make.conf, repos.conf, and any file with a name that begins with "package." can be more than just a flat file. If it is a directory, then all the files in that directory will be sorted in ascending alphabetical order by file name and summed together as if it were a single file. | - John |
/etc/portage/package.use.d/ and /etc/portage/package.use file etc would be nicer. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21490
|
Posted: Sun Jul 01, 2018 5:50 pm Post subject: |
|
|
Why pollute the upper namespace and make tab completion even less effective by having separate .d directories? |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Mon Jul 02, 2018 9:39 am Post subject: |
|
|
johngalt wrote: | Th alphabetized filenames for individual file use - is that of any sort of significance? My gut says that I'll just need to be careful in case something needs to be loaded prior to another item - but my gut also says that it seems more logical that portage loads everything in the directory every time an emerge is called, so I'm confused.... |
It's not a big deal, you just need to avoid situations such as the following hypothetical example:
Code: | $ grep bluray /etc/portage/package.use/*
/etc/portage/package.use/my_media_players:media-video/vlc bluray
/etc/portage/package.use/zzzzzz:media-video/vlc -bluray |
As the file 'zzzzzz' in the above example is parsed after the file 'my_media_players', the second instance of the bluray USE flag would override the first instance of the bluray USE flag, so the vlc package would be built using USE="-bluray". _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Jul 02, 2018 2:43 pm Post subject: |
|
|
Hu wrote: | Why pollute the upper namespace and make tab completion even less effective by having separate .d directories? |
If we were changing the file layout, the first thing I'd do is remove the stupid "package." prefix from all of them entirely. |
|
Back to top |
|
|
johngalt Apprentice
Joined: 09 Sep 2004 Posts: 258 Location: 3rd Rock
|
Posted: Mon Jul 02, 2018 3:37 pm Post subject: |
|
|
Fitzcarraldo wrote: | johngalt wrote: | Th alphabetized filenames for individual file use - is that of any sort of significance? My gut says that I'll just need to be careful in case something needs to be loaded prior to another item - but my gut also says that it seems more logical that portage loads everything in the directory every time an emerge is called, so I'm confused.... |
It's not a big deal, you just need to avoid situations such as the following hypothetical example:
Code: | $ grep bluray /etc/portage/package.use/*
/etc/portage/package.use/my_media_players:media-video/vlc bluray
/etc/portage/package.use/zzzzzz:media-video/vlc -bluray |
As the file 'zzzzzz' in the above example is parsed after the file 'my_media_players', the second instance of the bluray USE flag would override the first instance of the bluray USE flag, so the vlc package would be built using USE="-bluray". |
Ha! Thanks.
I didn't consider having opposing USE flags. _________________
desultory wrote: | If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior. |
Amen. |
|
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
|
|