From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-portage-dev+bounces-5482-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4C78E1384B4 for <garchives@archives.gentoo.org>; Sat, 2 Jan 2016 23:05:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36D0421C0A3; Sat, 2 Jan 2016 23:05:20 +0000 (UTC) Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 844EB21C07B for <gentoo-portage-dev@lists.gentoo.org>; Sat, 2 Jan 2016 23:05:19 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id k129so196268175yke.0 for <gentoo-portage-dev@lists.gentoo.org>; Sat, 02 Jan 2016 15:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=06eAT++wu5OYShHsTnLJmiBJklQw/keOUhWnBiRDY34=; b=zckgUjrQsTnnTeg2r2T8Dh/SOm67wpvAclu+X+3eamhyRqvTaxmJq/nnWJ+byC0xaD iaG249sGw7UYDq+W+p4G2fsmV0Chu9/zsprMRQ3WNZNUk5wtfzbtuYLluwa++EmClGVm huweAy/RbegOoFzhZAu7DLWnnZQQSSCreBXvcGyfqXBiJbniBbRYu5FOZk8hpty7+kcO ZpHQYLucqJfReZANaSUcBbUnXIY1TEdzRax7jSim9p60ZlCHTqf1wkPtwbaGnQdEdC3x ctsueaM7Ddk/4KHBD4MK4VThowxCHikk2QOKmz3bwYUcJcjRzUxgZW19uzP2R0r1RCSX Ic1w== X-Received: by 10.13.204.204 with SMTP id o195mr48579604ywd.175.1451775918585; Sat, 02 Jan 2016 15:05:18 -0800 (PST) Received: from rapture.members.linode.com (battletoad.com. [45.79.196.89]) by smtp.gmail.com with ESMTPSA id 204sm69443777ywz.39.2016.01.02.15.05.17 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 02 Jan 2016 15:05:17 -0800 (PST) From: Lucian Poston <lucian.poston@gmail.com> To: gentoo-portage-dev@lists.gentoo.org Cc: bernalex@gentoo.org, Lucian Poston <lucian.poston@gmail.com> Subject: [gentoo-portage-dev] [PATCH v3] emerge: Add --autounmask-only parameter (bug 570672) Date: Sat, 2 Jan 2016 15:05:28 -0800 Message-Id: <1451775928-26159-1-git-send-email-lucian.poston@gmail.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1450906772-14853-1-git-send-email-lucian.poston@gmail.com> References: <1450906772-14853-1-git-send-email-lucian.poston@gmail.com> Precedence: bulk List-Post: <mailto:gentoo-portage-dev@lists.gentoo.org> List-Help: <mailto:gentoo-portage-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-portage-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-portage-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-portage-dev.gentoo.org> X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 36ab26c7-0d9c-44ba-90fb-caa4169ddede X-Archives-Hash: 94219ffc3dbef96eb970a67bb672e6db The --autounmask-only parameter will display autounmask messages, perform autounmasking (in accordance with the other --autounmask-* parameters), and exit with success (return value 0). X-Gentoo-Bug: 570672 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=570672 --- man/emerge.1 | 6 ++++++ pym/_emerge/actions.py | 4 ++++ pym/_emerge/main.py | 11 +++++++++++ 3 files changed, 21 insertions(+) diff --git a/man/emerge.1 b/man/emerge.1 index c03f044..05b2a01 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -361,6 +361,12 @@ the specified configuration file(s), or enable the \fBEMERGE_DEFAULT_OPTS\fR variable may be used to disable this option by default in \fBmake.conf\fR(5). .TP +.BR "\-\-autounmask\-only [ y | n ]" +Instead of doing any package building, just unmask +packages and generate package.use settings as necessary +to satisfy dependencies. This option is disabled by +default. +.TP .BR "\-\-autounmask\-unrestricted\-atoms [ y | n ]" If \-\-autounmask is enabled, keyword and mask changes using the \'=\' operator will be written. With this diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index a080ba4..1c59abd 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -327,6 +327,10 @@ def action_build(settings, trees, mtimedb, display_missing_pkg_set(root_config, e.value) return 1 + if "--autounmask-only" in myopts: + mydepgraph.display_problems() + return 0 + if not success: mydepgraph.display_problems() return 1 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 5a8b93c..5dbafee 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -127,6 +127,7 @@ def insert_optional_args(args): '--alert' : y_or_n, '--ask' : y_or_n, '--autounmask' : y_or_n, + '--autounmask-only' : y_or_n, '--autounmask-keep-masks': y_or_n, '--autounmask-unrestricted-atoms' : y_or_n, '--autounmask-write' : y_or_n, @@ -323,6 +324,11 @@ def parse_opts(tmpcmdline, silent=False): "choices" : true_y_or_n }, + "--autounmask-only": { + "help" : "only perform --autounmask", + "choices" : true_y_or_n + }, + "--autounmask-unrestricted-atoms": { "help" : "write autounmask changes with >= atoms if possible", "choices" : true_y_or_n @@ -745,6 +751,11 @@ def parse_opts(tmpcmdline, silent=False): if myoptions.autounmask in true_y: myoptions.autounmask = True + if myoptions.autounmask_only in true_y: + myoptions.autounmask_only = True + else: + myoptions.autounmask_only = None + if myoptions.autounmask_unrestricted_atoms in true_y: myoptions.autounmask_unrestricted_atoms = True -- 2.4.10