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 1A94C138334 for ; Wed, 14 Aug 2019 21:14:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14C30E0806; Wed, 14 Aug 2019 21:14:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 AB5C0E07F2 for ; Wed, 14 Aug 2019 21:14:04 +0000 (UTC) Received: from naomi.gilbertsystems.net (d192-24-229-26.try.wideopenwest.com [24.192.26.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 21514349B63 for ; Wed, 14 Aug 2019 21:14:03 +0000 (UTC) From: Mike Gilbert To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst Date: Wed, 14 Aug 2019 17:14:00 -0400 Message-Id: <20190814211400.58175-1-floppym@gentoo.org> X-Mailer: git-send-email 2.23.0.rc1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 6425ec68-6854-4340-a737-893c9437c721 X-Archives-Hash: 05fa77fba350f0b759c4041c4f1a74cc Closes: https://bugs.gentoo.org/691478 Signed-off-by: Mike Gilbert --- eclass/acct-user.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass index 60009643c144..cec5d0506879 100644 --- a/eclass/acct-user.eclass +++ b/eclass/acct-user.eclass @@ -334,6 +334,11 @@ acct-user_pkg_preinst() { if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]} fi + # Path might be missing due to INSTALL_MASK, etc. + # https://bugs.gentoo.org/691478 + if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then + keepdir "${ACCT_USER_HOME}" + fi fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}" fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}" fi -- 2.23.0.rc1