<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>154628</bug_id>
          
          <creation_ts>2006-11-09 19:47 0000</creation_ts>
          <short_desc>app-portage/ufed-0.40-r3 package.use.{force,mask} issues</short_desc>
          <delta_ts>2006-11-25 19:30:37 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>2.1</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>petter@cs.ubishops.ca</reporter>
          <assigned_to>truedfx@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>petter@cs.ubishops.ca</who>
            <bug_when>2006-11-09 19:47:13 0000</bug_when>
            <thetext>When I run ufed, certain USE flags (the ones I have noticed are mmx, sse, and sse2) do not show up. Worse, if I use ufed to save settings to make.conf, these flags will be explicitly UNset; that is, if I have manually entered them as USE=&quot;[...] mmx sse sse2&quot;, then ufed will modify make.conf to contain instead USE=&quot;[...] -mmx -sse -sse2&quot;. (This appears whether or not I have make.conf source layman&apos;s make.conf.)

dreadfort ~ # emerge --info
Portage 2.1.2_rc1-r5 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo x86_64)
=================================================================
System uname: 2.6.18-gentoo x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.6
Last Sync: Fri, 10 Nov 2006 03:00:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon64 -O2 -fomit-frame-pointer -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/share/X11/xkb&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c&quot;
CXXFLAGS=&quot;-march=athlon64 -O2 -fomit-frame-pointer -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://gentoo.cites.uiuc.edu/pub/gentoo http://prometheus.cs.wmich.edu/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://mirror.espri.arizona.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://distfiles.gentoo.org&quot;
LANG=&quot;en_US.UTF-8&quot;
LC_ALL=&quot;en_US.UTF-8&quot;
LDFLAGS=&quot;-Wl,-O1&quot;
LINGUAS=&quot;en&quot;
MAKEOPTS=&quot;-j2 -l1&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://castleblack/gentoo-portage&quot;
USE=&quot;amd64 7zip X a52 aac acpi aiglx aim aimextras alsa amr apache2 artworkextra avahi bash-completion beagle berkdb bitmap-fonts branding bzip2 cairo cdinstall cdr cdrom cdsound cli cracklib crypt cscope cups cursors daap dba dbus divx dlloader doc dri dts dvd dvi editor eds elibc_glibc encode fam ffmpeg firefox flac foomaticdb fortran gcc64 gdbm gdm gif gimp gimpprint glibc-omitfp glitz glut gmail gmailtimestamps gmedia gnome gnome-print gnuplot gnutls gphoto2 gpm gstreamer gstreamer010 gtalk gtk gtk2 gtkhtml hal howl-compat icons iconv icq id3 imlib initng_plugins_also initng_plugins_bash_launcher initng_plugins_chdir initng_plugins_chroot initng_plugins_conflict initng_plugins_cpout initng_plugins_critical initng_plugins_cron initng_plugins_daemon initng_plugins_dev initng_plugins_dllaunch initng_plugins_envparser initng_plugins_find initng_plugins_fstat initng_plugins_history initng_plugins_idleprobe initng_plugins_initctl initng_plugins_interactive initng_plugins_iparser initng_plugins_last initng_plugins_limit initng_plugins_logfile initng_plugins_netprobe initng_plugins_ngc4 initng_plugins_pause initng_plugins_pidfile initng_plugins_reload initng_plugins_renice initng_plugins_rlparser initng_plugins_simple_launcher initng_plugins_stcmd initng_plugins_stdout initng_plugins_suid initng_plugins_syncron initng_plugins_syslog initng_plugins_unneeded input_devices_evdev input_devices_keyboard input_devices_mouse ipod iproute2 ipv6 isdnlog jabber jpeg jpeg2k kernel_linux libg++ libnotify linguas_en lm_sensors logitech-mouse logrotate mad math mdnsresponder-compat mikmod modplug mono mozbranding mozcalendar mozdevelop moznocompose moznoirc moznomail mozsvg mp3 mp4 mp4live mpeg msn musepack music musicbrainz nautilus ncurses network nls nptl nptlonly nsplugin nvidia offensive ogg oggvorbis openal opengl pam pcre pdf perl png ppds pppd python qt-static quicktime readline realmedia reflection reiserfs rhythmbox rtc scanner sdl session sid spl ssl stencil-buffer stream svg t1lib tcpd tetex textures themes theora threads thunderbird tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales vcd video_cards_nvidia video_cards_vesa videos vim vim-with-x vorbis wma wma123 wmf wmp xchat xchatdccserver xcomposite xforms xml xorg xpm xprint xrandr xv xvid xvmc yahoo zlib&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-11-10 00:15:37 0000</bug_when>
            <thetext>Don&apos;t mess with these flags, they are dealt with by amd64 profiles as needed and enabling/disabling them in make.conf won&apos;t have any effect.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>petter@cs.ubishops.ca</who>
            <bug_when>2006-11-10 09:15:56 0000</bug_when>
            <thetext>According to Simon Stelling, this is no longer the case: http://www.mail-archive.com/gentoo-amd64@lists.gentoo.org/msg06170.html

Also, I assure you that toggling them in make.conf has SOME effect, at least to the degree that emerge appears to treat them &quot;properly&quot;: E.g. if I `emerge -va gimp` it gives all appearances of respecting them. (This is not to say that the ebuild couldn&apos;t be filtering them, but from the recent guideline referred to above, this is the CORRECT way of dealing with them.)

In any case, even if I should leave these USE flags be and what I&apos;m doing is folly, I still don&apos;t like the way that ufed deals with it. If they are masked, then perhaps ufed could indicate that I can&apos;t set them, or something; having it silently disable flags is puzzling and disconcerting. (As I&apos;ve no idea why it does it, I also wonder whether it might, at some point, start disabling other flags.)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-11-10 11:43:36 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; In any case, even if I should leave these USE flags be and what I&apos;m doing is
&gt; folly, I still don&apos;t like the way that ufed deals with it. If they are masked,
&gt; then perhaps ufed could indicate that I can&apos;t set them, or something; having it
&gt; silently disable flags is puzzling and disconcerting. (As I&apos;ve no idea why it
&gt; does it, I also wonder whether it might, at some point, start disabling other
&gt; flags.)

It does this because the flags are enabled by the profile, but after quitting ufed, are not in your selected list of flags. The reason they cannot be in your selected list of flags is because they are masked, meaning they do not appear in the list at all. This is a design flaw.

It should be fairly easy to modify ufed to get rid of anything masked. However, the proper solution for this bug involves parsing package.use.*, and to be honest, I&apos;m not completely sure how the files interact yet. I&apos;ll try to get the more direct workaround (not allowing &quot;mmx&quot; e.a. to be selected, but not putting &quot;-mmx&quot; in make.conf either) done in the weekend.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-11-10 14:16:32 0000</bug_when>
            <thetext>0.40-r4 should no longer have this problem. You won&apos;t be able to select the mmx flag, and ufed will not put it in /etc/make.conf. I&apos;ll not close this yet, because as noted, this is less buggy behaviour, but not correct yet. It should allow the mmx flag to be enabled or disabled.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-11-12 13:07:31 0000</bug_when>
            <thetext>Created an attachment (id=101777)
ufed-packageusemask.patch

This should fix the bug, although it may give a few false positives (such as possibly allowing mmx in the list even when there isn&apos;t any single package for which you can choose whether to enable it), but since those false positives should be temporary, it doesn&apos;t really do any harm either. Could you give it a try to see if I missed anything in my testing (since I don&apos;t have an amd64, and only amd64 profiles use package.use.* so far)? Just save the patch, and run
  patch -d/ -p0 &lt;ufed-packageusemask.patch
as root.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2006-11-25 19:30:37 0000</bug_when>
            <thetext>Fixed slightly differently after comments on bug #156191.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>101777</attachid>
            <date>2006-11-12 13:07 0000</date>
            <desc>ufed-packageusemask.patch</desc>
            <filename>ufed-packageusemask.patch</filename>
            <type>text/plain</type>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