When /etc/make.conf is a directory containing include files, the euse tool can not enable use flags.
Steps to Reproduce:
The issue occures when /etc/portage/make.conf is used as a include directory and not a file. The euse tool does not expect this and fails poorly.
Backup current make.conf
$> mv /etc/portage/make.conf /etc/portage/make.conf.backup
Create make.conf include directory
$> mkdir /etc/portage/make.conf
Make a copy of the backed up make.conf in the new include directory.
Note: I used local, but the filename can be anything, or multiple files
$> cp /etc/portage/make.conf /etc/portage/make.conf/local
With the Environment setup, I issue a euse command to enable a use flag (alsa in this case)
$> euse -E alsa
/usr/bin/euse: line 278: source: /etc/portage/make.conf: is a directory
Adding flag "alsa" to make.conf
cp: -r not specified; omitting directory '/etc/portage/make.conf'
/usr/bin/euse: line 1162: /etc/portage/make.conf.euse_backup: No such file or directory
/usr/bin/euse: line 1267: /etc/portage/make.conf: Is a directory
/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup
I expect the script to fail gracefully citing that a make.conf include directory is not supported, or make changes to support a make.conf include directory.
Relevant other make.conf include directory bug I found with euse:
#556514 - app-portage/gentoolkit: euse can't source files from make.conf directory
This is a similar bug, but relating to sourcing in the files from the include directory. The case filed above is reporting changes to the make.conf file/directory that are in error.