eix icon indicating copy to clipboard operation
eix copied to clipboard

[improvement request] eix-test-obsolete - Check for superfluous Use-Flags

Open coding-jj opened this issue 8 years ago • 4 comments

Right now eix-test-obsolete is not searching for superfluous use flags. The desired behavior is, that use flags are defined only in one place for one polarity (+/-) and not redundant with the same polarity.

  • /etc/portage/make.conf

    Check if use flags are already set/unset in the Gentoo Profile /etc/portage/make.profile and show as superfluous

  • /etc/portage/package.use directory/file

    Check if use flags are already set/unset in the Gentoo Profile or make.conf and show as superfluous

    Check if packages are still installed and show if there are use flag definitions for packages that are not installed any more

coding-jj avatar Apr 22 '17 14:04 coding-jj

eix has no full support for USE-flags; see the TODO file for the reasons.

Doing only some half-hearted support does not seem right to me: It is still a quite large amount of work (e.g. it requires a completely different treatment of the REDUNDANT_IF_… mechanism), does not work satisfactory (if e.g. the defaults are not taken correctly into account), and probably needs frequent changes due to extended mechanisms. Moreover, many people prefer to set certain use-defaults with wildcards (e.g. */* -foo in /etc/portage/package.use) and then override it with more specific settings, so one would also need new mechanisms to honour that.

All in all, I think that this should be a task for a completely separate tool; the built-in functionality of eix is not of much help for such a tool (that tool might still use helper tools of eix like masked-packages).

vaeth avatar Apr 22 '17 15:04 vaeth

(0.32.9)

I also find eix-test-obsolete output of redundancy info very useful as is.

But after more granular USE flag separation via package.use/ directory, I'm getting "false" positives for packages listed in separate files, even though package entry in each file has a different USE flag set defined.

As @vaeth has stated USE flag logic is highly complicated, has anyone found any alternative tools for high quality USE flag management?

lkraav avatar Aug 04 '18 11:08 lkraav

Your “false” postives come probably from REDUNDANT_IF_DOUBLE_USE. In your case it makes sense to set REDUNDANT_IF_DOUBLE_USE="false" in some new file in /etc/eixrc

vaeth avatar Aug 04 '18 11:08 vaeth

Your “false” postives come probably from REDUNDANT_IF_DOUBLE_USE.

Yes, but it's useful for catching mistakes when I leave the exact same USE flag configuration in multiple files :)

lkraav avatar Aug 04 '18 14:08 lkraav