This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Talk:/etc/portage/package.env

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
Note
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.

Setting FEATURES on specific packages

Talk status
This discussion is done.

I might be wrong, but I think that the env files only "add" stuff to the default configs. If so, it should be stated in the article.

My case is: I have enabled ccache and distcc in my make.conf. Now, if I want to disable ccache and distcc for virtualbox (the compilation notoriously fails with them...), I think it works only when I specify FEATURES="-ccache -distcc"

Initially, I have put FEATURES="", to clear the FEATURES flag, but it didn't work. — Preceding unsigned comment added by Kupusc (talkcontribs) 05:18, March 7, 2016‎

Hi Kupusc , I can look into this. I need to enhance my Portage skillz anyway. I'll close the discussion when I find the answer. Also, please remember to sign your comments on discussion packages. The button is in the formatting box. Kind regards, --Maffblaster (talk) 20:06, 7 December 2016 (UTC)
Have an answer! It should work on a per-package basis but be aware the FEATURES variable is an incremental variable, meaning if it's already specified in /etc/portage/make.conf then Portage will read the values from the make.conf definition, and then read the values from the /etc/portage/package.use file/directory. In other words if FEATURES="ccache distcc" in make.conf, and FEATURES="-ccache -distcc" in package.use, then Portage sees FEATURES set to FEATURES="ccache distcc -ccache -distcc" at emerge time. This ultimately results in ccache and distcc being disabled, as you intend. Hopefully that makes sense. --Maffblaster (talk) 23:00, 5 January 2017 (UTC)

Directory instead of file

Talk status
This discussion is done as of October 26, 2017.

Shouldn't /etc/portage/package.env be rather used as directory with modular files for every package inside, instead of being one big file with a list of all packages? — The preceding unsigned comment was added by Pygospa (talkcontribs)

Depends on personal preferences. But describing it as a "file only" as in this article seems indeed wrong.
man5 portage says:
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.

--Charles17 (talk) 11:10, 4 August 2017 (UTC)

entries starting with <=, = and (=> or nothing) operators

Talk status
This discussion is still ongoing as of September 2, 2018.

Shouldn't these apparent operators be documented here? --necktwi (talk) 11:20, 2 September 2018 (IST)