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 B09FE138334 for ; Sat, 14 Jul 2018 07:47:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 400F6E08A4; Sat, 14 Jul 2018 07:47:31 +0000 (UTC) Received: from mx-out2.startmail.com (mx-out2.startmail.com [145.131.90.155]) (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 CE049E070D for ; Sat, 14 Jul 2018 07:47:30 +0000 (UTC) Date: Sat, 14 Jul 2018 02:46:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=startmail.com; s=2017-11; t=1531554448; bh=n21zHmzDBUvXTdkm+1+FaUrA6fdKLiz2MKneo7ePQxc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pXpn6EF1FVQyBUeDtIYHV8S09wlA28pjGqELFKJWv1mC7bBPqkEuwNjT0P4AAuSY/ RTqj+WeDvIA3lb4T5hpJpdwf+ZkQk8va+KGuwg1j/pCaLA055KALNytohNglBXm/Qj jX19whRe3o9Odf6w2mzD+eTa6PPR9nLb8cz9OwG7oGfdBp4DYA65trvDTZrS3q96e5 ARsPV8AlLwHAl9KH6P+Nzkz7Zc+CH8sf2yTPuxjh06uRYtmeW2gEvLaw2gs7zf66sV ngHIqe5i/eSHDy9kEZjV71uIjrVX+5kDseH/Rp6cnoPEzZX1GaMM2JJwoWFBfUma0t lPlLhcsgYqoYQ== From: "Marty E. Plummer" To: Ulrich Mueller Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] linux-info.eclass: account for lack of trailing slash Message-ID: <20180714074606.ltepua7ey5ct2f2r@proprietary-killer> References: <20180713235723.32617-1-hanetzer@startmail.com> <23369.38518.32731.496320@a1i15.kph.uni-mainz.de> 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 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23369.38518.32731.496320@a1i15.kph.uni-mainz.de> X-Archives-Salt: c4f4dc91-6328-4008-833b-93997df578d6 X-Archives-Hash: 41e739ba10df90d8c4ad6a3cf08e58a6 On Sat, Jul 14, 2018 at 08:21:42AM +0200, Ulrich Mueller wrote: > >>>>> On Fri, 13 Jul 2018, Marty E Plummer wrote: > > > In EAPI 7, D, ED, ROOT, EROOT no longer have a trailing slash[1]. This > > makes finding /usr/src/linux not work properly as it currently stands. > > > Use the form "${ROOT%/}/" where apropos in order to unify behavior across > > EAPIs. > > > 1: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-113001r7 > > Please use https://projects.gentoo.org/pms/7/pms.html if you want the > fragment identifier to be stable (which is not guaranteed for the > version in my home directory). > Ok, will do. > > @@ -554,7 +554,7 @@ get_version() { > > # caught before this if they are. > > if [[ -z ${OUTPUT_DIR} ]] ; then > > # Try to locate a kernel that is most relevant for us. > > - for OUTPUT_DIR in "${SYSROOT}" "${ROOT}" "" ; do > > + for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}/" "" ; do > > Shouldn't it be "${ROOT%/}" here? Otherwise OUTPUT_DIR may begin with > a double slash. > Ah, good point. I didn't check that well enough, will fix it up. > > OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build" > > if [[ -e ${OUTPUT_DIR} ]] ; then > > break