From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C0521382C5 for ; Wed, 7 Feb 2018 19:51:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 74B92E09CF; Wed, 7 Feb 2018 19:51:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 42BE5E09CF for ; Wed, 7 Feb 2018 19:51:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0DB83335C30 for ; Wed, 7 Feb 2018 19:51:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C54B1C5 for ; Wed, 7 Feb 2018 19:51:13 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1518033063.587512e176c5ea13385e7f5ba5d2c23afe80a8c3.williamh@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/baselayout/baselayout-9999.ebuild X-VCS-Directories: sys-apps/baselayout/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 587512e176c5ea13385e7f5ba5d2c23afe80a8c3 X-VCS-Branch: master Date: Wed, 7 Feb 2018 19:51:13 +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: 93b15c98-f90c-4ff1-80a4-6660338ab30b X-Archives-Hash: f09b9a74a9132c2b2f2b2b1f3feeb869 commit: 587512e176c5ea13385e7f5ba5d2c23afe80a8c3 Author: William Hubbs gentoo org> AuthorDate: Wed Feb 7 19:49:41 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Feb 7 19:51:03 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=587512e1 sys-apps/baselayout: Live ebuild cleanups: - run layout targets in src_install - call multilib_layout only in pkg_setup - remove some baselayout-1.x migration code from pkg_preinst/pkg_postinst Package-Manager: Portage-2.3.19, Repoman-2.3.6 sys-apps/baselayout/baselayout-9999.ebuild | 49 ++++++++++-------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild index 4622672eb5b..20a7143a742 100644 --- a/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sys-apps/baselayout/baselayout-9999.ebuild @@ -18,11 +18,7 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="build usrmerge kernel_linux" - -pkg_setup() { - multilib_layout -} +IUSE="usrmerge kernel_linux" # Create our multilib dirs - the Makefile has no knowledge of this multilib_layout() { @@ -136,31 +132,15 @@ multilib_layout() { fi } -pkg_preinst() { - # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of - # the baselayout-1.x ebuild copies all the real configs from the user's - # /etc/conf.d into ${D}, it makes them all appear to be the default - # versions. In order to protect them from being unmerged after this - # upgrade, modify their timestamps. - touch "${EROOT}"/etc/conf.d/* 2>/dev/null +pkg_setup() { + multilib_layout +} +pkg_preinst() { # This is written in src_install (so it's in CONTENTS), but punt all # pending updates to avoid user having to do etc-update (and make the # pkg_postinst logic simpler). rm -f "${EROOT}"/etc/._cfg????_gentoo-release - - # We need to install directories and maybe some dev nodes when building - # stages, but they cannot be in CONTENTS. - # Also, we cannot reference $S as binpkg will break so we do this. - multilib_layout - if use build ; then - if ! use usrmerge; then - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout - else - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge - fi - fi - rm -f "${ED}"/usr/share/${PN}/Makefile } src_prepare() { @@ -190,15 +170,22 @@ src_prepare() { } src_install() { + if ! use usrmerge; then + emake \ + OS=$(usex kernel_FreeBSD BSD Linux) \ + DESTDIR="${ED}" \ + layout + else + emake \ + OS=$(usex kernel_FreeBSD BSD Linux) \ + DESTDIR="${ED}" \ + layout-usrmerge + fi emake \ OS=$(usex kernel_FreeBSD BSD Linux) \ DESTDIR="${ED}" \ install dodoc ChangeLog - - # need the makefile in pkg_preinst - insinto /usr/share/${PN} - doins Makefile } pkg_postinst() { @@ -235,10 +222,6 @@ pkg_postinst() { fi fi - # baselayout leaves behind a lot of .keep files, so let's clean them up - find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null - find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null - # whine about users with invalid shells #215698 if [[ -e "${EROOT}"etc/passwd ]] ; then local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)