In package.use, I like to sometimes comment out use flags on the same line that is being processed. I just realized that there is a problem with this, at least in the use case that I'm showing below. Here is a line that I had in my package.use: app-emulation/virtualbox-ose headless # additions When I attempt an "emerge -uDN world -pv", or an "emerge virtualbox-ose -pv", I see the following output: ============ ebuild R ] app-emulation/virtualbox-ose-1.6.6 USE="additions* headless qt3 -alsa -pulseaudio -sdk" 0 kB ============ I didn't know why the "additions" flag was pulled in. I changed the line in my package.use to remove the comment: app-emulation/virtualbox-ose headless and with "emerge virtualbox-ose -pv", I see the following output: ============ These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-emulation/virtualbox-ose-1.6.6 USE="headless qt3 -additions -alsa -pulseaudio -sdk" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB ============ It seems that the use flag that appears *after* the comment in the first part is being processed. I think this is *not* intended behavior. Reproducible: Always Steps to Reproduce: 1. Edit /etc/portage/package.use 2. At the end of an existing line, add a comment character '#' followed by a use flag that's not currently selected 3. Emerge the package Actual Results: The flag that is commented out at the end of the line is processed and used by emerge. Expected Results: The commented flag should not be used. This is probably a trivial upgrade. The text processor for package.use should throw away everything that appears after every comment character until the end of the line. A preprocessor (or whatever handles comments in package.use) should add the regex, "s/\#.*$//g" The expected result can be demonstrated on the command line by the following: cat /etc/portage/package.use | sed "s/\#.*$//g"
*** This bug has been marked as a duplicate of bug 141747 ***
Oops. I did multiple a bug searches before filing this; I looked through the automated one and I did an extra search of my own. I just didn't consider using the non-default search options of including resolved bugs. I would agree with the other posters that it would be more intuitive, and follow more standard commenting conventions, if "end-of-line comments" were allowed. It would also put an end to even more duplicate bugs like this being submitted. However, it's easy for me to work around now that I know the behavior.