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 7F36C138262 for ; Sun, 22 May 2016 06:56:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E5E114293; Sun, 22 May 2016 06:56:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 79ECF14267 for ; Sun, 22 May 2016 06:56:12 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id F1961340B1F; Sun, 22 May 2016 06:56:10 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-portage-dev] [PATCH 1/3] portage.package.ebuild.config: Move FEATURES=no* handling there Date: Sun, 22 May 2016 08:56:02 +0200 Message-Id: <20160522065604.10593-2-mgorny@gentoo.org> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160522065604.10593-1-mgorny@gentoo.org> References: <20160522065604.10593-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 7e87b27a-4384-4af2-872e-ff2ec6e78c31 X-Archives-Hash: bdce65377f162be398230c648d4f9712 Move the code responsible for adding additional paths to INSTALL_MASK into portage.package.ebuild.config. --- bin/misc-functions.sh | 13 ------------- pym/portage/package/ebuild/config.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 58755a1..b42e1d6 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -314,20 +314,7 @@ preinst_mask() { # in there in case any tools were built with -pg in CFLAGS. cd "${T}" - # remove man pages, info pages, docs if requested - local f - for f in man info doc; do - if has no${f} $FEATURES; then - INSTALL_MASK="${INSTALL_MASK} /usr/share/${f}" - fi - done - install_mask "${ED}" "${INSTALL_MASK}" - - # remove share dir if unnessesary - if has nodoc $FEATURES || has noman $FEATURES || has noinfo $FEATURES; then - rmdir "${ED}usr/share" &> /dev/null - fi } preinst_sfperms() { diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 45b7d08..fcc7ce5 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1773,6 +1773,16 @@ class config(object): # setcpv triggers lazy instantiation of things like _use_manager. _eapi_cache.clear() + # Prepare the final value of INSTALL_MASK + install_mask = self["INSTALL_MASK"].split() + if 'nodoc' in self.features: + install_mask.append("/usr/share/doc") + if 'noinfo' in self.features: + install_mask.append("/usr/share/info") + if 'noman' in self.features: + install_mask.append("/usr/share/man") + self["INSTALL_MASK"] = ' '.join(install_mask) + def _grab_pkg_env(self, penv, container, protected_keys=None): if protected_keys is None: protected_keys = () -- 2.8.3