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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8313115800F for ; Sat, 28 Jan 2023 21:00:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2730BE092A; Sat, 28 Jan 2023 21:00:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8F58E092A for ; Sat, 28 Jan 2023 21:00:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F080633BF51 for ; Sat, 28 Jan 2023 21:00:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 58FE8858 for ; Sat, 28 Jan 2023 21:00:38 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1674939551.41b18d2299e59710c1d65d37107d763fb85f9af0.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/baselayout/baselayout-2.13-r1.ebuild sys-apps/baselayout/baselayout-9999.ebuild X-VCS-Directories: sys-apps/baselayout/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 41b18d2299e59710c1d65d37107d763fb85f9af0 X-VCS-Branch: master Date: Sat, 28 Jan 2023 21:00:38 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63632bde-d357-4dfd-be25-f0bc4a732ecf X-Archives-Hash: d11aaf214b43feb03652ad5f5e9a4f78 commit: 41b18d2299e59710c1d65d37107d763fb85f9af0 Author: Mike Gilbert gentoo org> AuthorDate: Sat Jan 28 20:59:11 2023 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Jan 28 20:59:11 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41b18d22 sys-apps/baselayout: create ${ED}/var/{run,lock} in pkg_preinst Bug: https://bugs.gentoo.org/648880 Signed-off-by: Mike Gilbert gentoo.org> ...ayout-9999.ebuild => baselayout-2.13-r1.ebuild} | 25 ++++++++++------------ sys-apps/baselayout/baselayout-9999.ebuild | 23 +++++++++----------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-2.13-r1.ebuild similarity index 94% copy from sys-apps/baselayout/baselayout-9999.ebuild copy to sys-apps/baselayout/baselayout-2.13-r1.ebuild index 845f7f7a8dfb..71073b11c747 100644 --- a/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sys-apps/baselayout/baselayout-2.13-r1.ebuild @@ -12,7 +12,7 @@ if [[ ${PV} = 9999 ]]; then inherit git-r3 else SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" fi LICENSE="GPL-2" @@ -21,19 +21,6 @@ IUSE="build +split-usr" RDEPEND="!sys-apps/baselayout-prefix" -pkg_pretend() { - local stop= - if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then - eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run" - stop=1 - fi - if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then - eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock" - stop=1 - fi - [[ -z ${stop} ]] || die "please fix this before emerging baselayout" -} - pkg_setup() { multilib_layout } @@ -222,6 +209,16 @@ pkg_preinst() { fi fi rm -f "${ED}"/usr/share/${PN}/Makefile || die + + # Create symlinks in pkg_preinst to avoid Portage collision check. + # Create the symlinks in ${ED} via dosym so that we own it. + # Only create the symlinks if it wont cause a conflict in ${EROOT}. + if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then + dosym ../run/lock /var/lock + fi + if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then + dosym ../run /var/run + fi } src_prepare() { diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild index 845f7f7a8dfb..3c3f89d714de 100644 --- a/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sys-apps/baselayout/baselayout-9999.ebuild @@ -21,19 +21,6 @@ IUSE="build +split-usr" RDEPEND="!sys-apps/baselayout-prefix" -pkg_pretend() { - local stop= - if [[ ! -L ${EROOT}/var/run ]] && [[ -d ${EROOT}/var/run ]]; then - eerror "${EROOT}/var/run must be a symlink to ${EROOT}/run" - stop=1 - fi - if [[ ! -L ${EROOT}/var/lock ]] && [[ -d ${EROOT}/var/lock ]]; then - eerror "${EROOT}/var/lock must be a symlink to ${EROOT}/run/lock" - stop=1 - fi - [[ -z ${stop} ]] || die "please fix this before emerging baselayout" -} - pkg_setup() { multilib_layout } @@ -222,6 +209,16 @@ pkg_preinst() { fi fi rm -f "${ED}"/usr/share/${PN}/Makefile || die + + # Create symlinks in pkg_preinst to avoid Portage collision check. + # Create the symlinks in ${ED} via dosym so that we own it. + # Only create the symlinks if it wont cause a conflict in ${EROOT}. + if [[ -L ${EROOT}/var/lock || ! -e ${EROOT}/var/lock ]]; then + dosym ../run/lock /var/lock + fi + if [[ -L ${EROOT}/var/run || ! -e ${EROOT}/var/run ]]; then + dosym ../run /var/run + fi } src_prepare() {