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 E66CE1387D8 for ; Fri, 1 Feb 2013 21:12:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5979721C001; Fri, 1 Feb 2013 21:12:50 +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 B626A21C001 for ; Fri, 1 Feb 2013 21:12:49 +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 833B133DCD8 for ; Fri, 1 Feb 2013 21:12:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E77FDE4073 for ; Fri, 1 Feb 2013 21:12:46 +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: <1359744372.a28c1903b8bb0f87947fc3bc6f11531527cd1d0a.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses-types.c X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: a28c1903b8bb0f87947fc3bc6f11531527cd1d0a X-VCS-Branch: master Date: Fri, 1 Feb 2013 21:12:46 +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: 198abdb9-ccb2-4d05-8222-e6d6af1a2d99 X-Archives-Hash: 63cf2501a6c51e41578664e455296ea5 commit: a28c1903b8bb0f87947fc3bc6f11531527cd1d0a Author: Sven Eden gmx de> AuthorDate: Fri Feb 1 18:46:12 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Fri Feb 1 18:46:12 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=a28c1903 Added checks against forced status to isDescLegal(), because there are some flags that are forced but explicitly unmasked (like "multilib"). Those are still not changeable, because of the enforcement. --- ufed-curses-types.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ufed-curses-types.c b/ufed-curses-types.c index c80b9dd..0d31300 100644 --- a/ufed-curses-types.c +++ b/ufed-curses-types.c @@ -321,14 +321,22 @@ bool isDescLegal (const sFlag* flag, int idx) if (flag && (idx < flag->ndesc)) { if ( // 1.: Check isGlobal versus e_scope - ( ( flag->desc[idx].isGlobal && e_scope != eScope_local) - || (!flag->desc[idx].isGlobal && e_scope != eScope_global) ) + ( ( flag->desc[idx].isGlobal && (e_scope != eScope_local)) + || (!flag->desc[idx].isGlobal && (e_scope != eScope_global)) ) // 2.: Check isInstalled versus e_state - && ( ( flag->desc[idx].isInstalled && e_state != eState_notinstalled) - || (!flag->desc[idx].isInstalled && e_state != eState_installed) ) - // 3.: Check stateMasked versus e_mask - && ( (('+' == flag->desc[idx].stateMasked) && e_mask != eMask_unmasked) - || (('+' != flag->desc[idx].stateMasked) && e_mask != eMask_masked) ) ) + && ( ( flag->desc[idx].isInstalled && (e_state != eState_notinstalled)) + || (!flag->desc[idx].isInstalled && (e_state != eState_installed)) ) + // 3.: Check stateForced/stateMasked versus e_mask + && ( ( (e_mask != eMask_unmasked) + && ( (flag->globalMasked && ('-' != flag->desc[idx].stateMasked)) + || ('+' == flag->desc[idx].stateMasked) + || (flag->globalForced && ('-' != flag->desc[idx].stateForced)) + || ('+' == flag->desc[idx].stateForced) ) ) + || ( (e_mask != eMask_masked) + && ( (!flag->globalMasked && ('+' != flag->desc[idx].stateMasked)) + || ('-' == flag->desc[idx].stateMasked) ) + && ( (!flag->globalForced && ('+' != flag->desc[idx].stateForced)) + || ('-' == flag->desc[idx].stateForced) ) ) ) ) result = true; }