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 E0AC7138CC5 for ; Fri, 20 Mar 2015 23:46:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 955AEE07ED; Fri, 20 Mar 2015 23:46:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B70AE07ED for ; Fri, 20 Mar 2015 23:46:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 34096340AD1 for ; Fri, 20 Mar 2015 23:46:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 150D5142DF for ; Fri, 20 Mar 2015 23:46:24 +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: <1426890117.ccd83a5e9cc24833e1ab098cac1688f69ab6e9b6.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/savecache.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ccd83a5e9cc24833e1ab098cac1688f69ab6e9b6 X-VCS-Branch: master Date: Fri, 20 Mar 2015 23:46:24 +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: eaf2a72a-3e6d-4383-a3e4-feaeff6409bd X-Archives-Hash: 6d61a6eb3dce23a5736f641f6a786090 commit: ccd83a5e9cc24833e1ab098cac1688f69ab6e9b6 Author: Will Miles sgl com> AuthorDate: Wed Jan 14 23:19:13 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Mar 20 22:21:57 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ccd83a5e savecache: Make sure cache directory exists before running checkpath checkpath -W can fail if the specified path doesn't actually exist yet. In this case savecache script should attempt to create the path if it is missing, however it is pre-empted by the checkpath call. This patch adds an explicit existence test before executing checkpath. This fixes #36. init.d/savecache.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/savecache.in b/init.d/savecache.in index dde02dd..4fcf3db 100644 --- a/init.d/savecache.in +++ b/init.d/savecache.in @@ -13,7 +13,7 @@ start() return 1 fi fi - if ! checkpath -W "$RC_LIBEXECDIR"/cache; then + if [ -e "$RC_LIBEXECDIR"/cache ] && ! checkpath -W "$RC_LIBEXECDIR"/cache; then ewarn "WARNING: ${RC_LIBEXECDIR}/cache is not writable!" if ! yesno "${RC_GOINGDOWN}"; then ewarn "Unable to save deptree cache"