public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
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	[thread overview]
Message-ID: <20160522065604.10593-2-mgorny@gentoo.org> (raw)
In-Reply-To: <20160522065604.10593-1-mgorny@gentoo.org>

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



  reply	other threads:[~2016-05-22  6:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-22  6:56 [gentoo-portage-dev] [PATCH 0/3] INSTALL_MASK redesign, part I Michał Górny
2016-05-22  6:56 ` Michał Górny [this message]
2016-06-12  7:19   ` [gentoo-portage-dev] [PATCH 1/3] portage.package.ebuild.config: Move FEATURES=no* handling there Zac Medico
2016-06-12  7:28     ` Zac Medico
2016-06-12  9:33       ` Michał Górny
2016-05-22  6:56 ` [gentoo-portage-dev] [PATCH 2/3] Move INSTALL_MASK handling into merging Michał Górny
2016-05-22  8:14   ` Michał Górny
2016-05-22  8:21   ` [gentoo-portage-dev] [PATCH v2] " Michał Górny
2016-06-12  8:41     ` Zac Medico
2016-06-12  9:10     ` Zac Medico
2016-06-12  9:28       ` Michał Górny
2016-06-12  9:49         ` Zac Medico
2016-06-12 10:05           ` Michał Górny
2016-06-12 10:28             ` Zac Medico
2016-06-12 20:29     ` Zac Medico
2016-06-12 20:43       ` Zac Medico
2016-06-12 20:52         ` Zac Medico
2016-05-22  6:56 ` [gentoo-portage-dev] [PATCH 3/3] portage.dbapi.vartree: Support exclusions in INSTALL_MASK Michał Górny
2016-06-12  9:20   ` Zac Medico
2016-06-12  9:31     ` Michał Górny
2016-06-12  9:43       ` Zac Medico
2016-06-12 10:03         ` Michał Górny
2016-06-12 10:23           ` Zac Medico
2016-05-31 15:58 ` [gentoo-portage-dev] [PATCH 4/3] portage.package.ebuild.config: Support path groups from install-mask.conf Michał Górny
2016-06-10 21:50   ` Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2018-03-15 19:22 [gentoo-portage-dev] [PATCH 0/3] INSTALL_MASK refurbishing resubmit Michał Górny
2018-03-15 19:22 ` [gentoo-portage-dev] [PATCH 1/3] portage.package.ebuild.config: Move FEATURES=no* handling there Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160522065604.10593-2-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox