2

When I used to emerge my software I was using USE instead of adding the flags to my /etc/portage/make.conf file. (Example: sudo USE="djvu postscript synctex magic" emerge --ask app-text/{zathura,zathura-meta}.

Now whenever I update my system, I have to re-emerge those programs with the previously used USE flags. This tells me I might want to add them to the make.conf file. Is there an easier way to do this than going through each line in my .{bash,zsh}_history file?

I recently found out about euse -a but I don't know if this is a complete list. If I can use euse -a then I can just use bash to put it all into one line and replace my USE="..." line in make.conf.

  • I decided to pull every USE flag from the last emerge for each program in .{bash,zsh}_history into one document called `~/USES` -- Then I ran `cat USES | xargs -n1 | sort -u | tr '\n' ' ' >> NEWUSES` and moved it into `/etc/portage/make.conf`. It's not exactly the most efficient, but I think it will have to do. I will try to create a workaround for this when/if I can. I am leaving this open just in case anyone knows a good fix, because I'm sure I'm not the only person who may need this solved. –  Jan 02 '19 at 20:26

2 Answers2

0

In /var/db/pkg/category/pkg_name-version/ you could find several files that could help :

  • IUSE_EFFECTIVE: Current flags.
  • PKGUSE: Overrided flags (file exists only if needed).
Francky
  • 341
  • 2
  • 2
  • I looked around in the directory you mentioned. The file "IUSE_EFFECTIVE" appears to have more flags than I have in use, and PKGUSE does not appear to exist. But I found a file called "USE". I used cat and compared it to the USE flags for a random package I have installed. It's almost the same USE flags, but with a few extra that aren't showing up in the emerge list. (Such as "userland_GU" and my kernel arch.) Although, I belive this is in the right direction. This was very useful, thank you. –  Sep 11 '19 at 16:37
  • Another lead could be in /usr/portage/metadata/md5-cache/category/pkg_name-version. This is odd that you don't have any PKGUSE, i have more than 100 (find /var/db/pkg/ -name "PKGUSE" | wc -l). – Francky Sep 12 '19 at 17:32
-1

/etc/portage/package.use is what you need.

https://wiki.gentoo.org/wiki//etc/portage/package.use

Hasta Dhana
  • 4,699
  • 7
  • 17
  • 26
Francky
  • 341
  • 2
  • 2
  • I understand what you're talking about, except that it is not what I needed at the time. I was simply looking for how to acquire all of the USE flags that I have used. I use /etc/portage/package.use/, but it's not relevant to the problem. [edited: I hit enter way too early.] –  Sep 08 '19 at 15:51