From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6C0BA1389F1 for ; Wed, 13 Feb 2013 09:23:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D3E2E0525; Wed, 13 Feb 2013 09:23:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD54DE0484 for ; Wed, 13 Feb 2013 09:23:29 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9915233E568 for ; Wed, 13 Feb 2013 09:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3600AE407B for ; Wed, 13 Feb 2013 09:23:27 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1360694592.5b1937661fc76d37ca90cea35901016c63c50f45.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: Portage.pm X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 5b1937661fc76d37ca90cea35901016c63c50f45 X-VCS-Branch: master Date: Wed, 13 Feb 2013 09:23:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8b4ed392-30cd-44e0-9d46-7c376771b5a7 X-Archives-Hash: 84dc7132369dc2de326ce0e56c91d36f commit: 5b1937661fc76d37ca90cea35901016c63c50f45 Author: Sven Eden gmx de> AuthorDate: Tue Feb 12 18:43:12 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Tue Feb 12 18:43:12 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=5b193766 Remove flags build from USE_EXPAND and USE_EXPAND_HIDDEN values. These can not be handled yet, although this is on the todo list. However, those flags must not be set in the general USE in make.conf. --- Portage.pm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 50 insertions(+), 1 deletions(-) diff --git a/Portage.pm b/Portage.pm index 06e711c..685d7f7 100644 --- a/Portage.pm +++ b/Portage.pm @@ -102,10 +102,11 @@ sub _read_packages; sub _read_sh; sub _read_use_force; sub _read_use_mask; +sub _remove_expands; # --- Package initialization --- INIT { - $_environment{$_} = {} for qw{USE}; + $_environment{$_} = {} for qw{USE USE_EXPAND USE_EXPAND_HIDDEN}; _determine_eprefix; _determine_make_conf; _determine_profiles; @@ -132,6 +133,7 @@ INIT { _read_use_mask; ## unintentionally unmask explicitly masked flags. _read_archs; _read_descriptions; + _remove_expands; _final_cleaning; _gen_use_flags; } @@ -840,4 +842,51 @@ sub _read_use_mask { return; } + +# TODO : Remove this function once the usage of the USE_EXPAND +# values is implemented. +# For now all use flags that are expanded are removed. They are not +# set in USE="foo" but in their respective values like APACHE2_MODULES="foo" +# +# Note: the values from base/make.defaults are: (but there might be more) +# USE_EXPAND="APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES ENLIGHTENMENT_MODULES +# FOO2ZJS_DEVICES MISDN_CARDS FRITZCAPI_CARDS FCDSL_CARDS VIDEO_CARDS DVB_CARDS +# LIRC_DEVICES INPUT_DEVICES LINGUAS USERLAND KERNEL ELIBC CROSSCOMPILE_OPTS +# ALSA_CARDS ALSA_PCM_PLUGINS LCD_DEVICES CAMERAS NETBEANS_MODULES QEMU_SOFTMMU_TARGETS +# QEMU_USER_TARGETS SANE_BACKENDS RUBY_TARGETS PHP_TARGETS NGINX_MODULES_HTTP +# NGINX_MODULES_MAIL XFCE_PLUGINS XTABLES_ADDONS GPSD_PROTOCOLS COLLECTD_PLUGINS +# DRACUT_MODULES OFED_DRIVERS GRUB_PLATFORMS FFTOOLS PYTHON_TARGETS CURL_SSL +# OPENMPI_FABRICS OPENMPI_RM OPENMPI_OFED_FEATURES LIBREOFFICE_EXTENSIONS +# VOICEMAIL_STORAGE PYTHON_SINGLE_TARGET ABI_X86" +# +# And the USE_EXPAND variables whose contents are not shown in package manager output. +# USE_EXPAND_HIDDEN="USERLAND KERNEL ELIBC CROSSCOMPILE_OPTS ABI_X86" +# +# Note2: It might be a good idea to leave this function and just reduce it to kill +# USE_EXPAND_HIDDEN flags, as they must not be seen anyway. +sub _remove_expands { + + if (defined($_environment{USE_EXPAND})) { + for my $key (map {my $x=lc($_)."_"; $x } keys $_environment{USE_EXPAND}) { + for my $flag (keys %$_use_temp) { + if ($flag =~ /^$key/ ) { + delete($_use_temp->{$flag}); + } + } + } + } ## Done looping USE_EXPAND + + if (defined($_environment{USE_EXPAND_HIDDEN})) { + for my $key (map {my $x=lc($_)."_"; $x } keys $_environment{USE_EXPAND_HIDDEN}) { + for my $flag (keys %$_use_temp) { + if ($flag =~ /^$key/ ) { + delete($_use_temp->{$flag}); + } + } + } + } ## Done looping USE_EXPAND_HIDDEN + + return; +} + 1;