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 E41E7138334 for ; Sat, 14 Jul 2018 06:21:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8BCDE09B6; Sat, 14 Jul 2018 06:21:48 +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 62EA4E09AB for ; Sat, 14 Jul 2018 06:21:48 +0000 (UTC) Received: from a1i15.kph.uni-mainz.de (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id B7DBD335C94; Sat, 14 Jul 2018 06:21:45 +0000 (UTC) Message-ID: <23369.38518.32731.496320@a1i15.kph.uni-mainz.de> Date: Sat, 14 Jul 2018 08:21:42 +0200 To: gentoo-dev@lists.gentoo.org Cc: "Marty E. Plummer" Subject: Re: [gentoo-dev] [PATCH] linux-info.eclass: account for lack of trailing slash In-Reply-To: <20180713235723.32617-1-hanetzer@startmail.com> References: <20180713235723.32617-1-hanetzer@startmail.com> X-Mailer: VM 8.2.0b under 24.3.1 (x86_64-pc-linux-gnu) From: Ulrich Mueller 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: multipart/signed; boundary="pgp+signed+u6V89wpXQfDprP8"; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: 38c9cdf7-90a9-4624-a6aa-0cbd583080df X-Archives-Hash: 7140a2afe9e2df74958d82bf1df974f2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --pgp+signed+u6V89wpXQfDprP8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> 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). > @@ -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. > OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build" > if [[ -e ${OUTPUT_DIR} ]] ; then > break --pgp+signed+u6V89wpXQfDprP8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBCAAGBQJbSZZjAAoJEMMJBoUcYcJzV0wIAKjGYkFnVv8R/ii9QR9WvuA4 xiyIceItE7Sf5LVIpFQsXZphLRVeRADxVjje15W5J6ETRSP8v5Te9pX3YDliHl2h b78eUxVRo7OtwrsrsaQ9B9OLgpQt3+aZ7VspSiK1KKcT1Sp74UaGE00i8lavC6pU 0Td6egAtgmrHJmQaNG1z9yvlLPL5STL4NuLow8t4AFpukfO3neM+UPmkVXrODDqQ v8JkJvxAcoXLbY5J77xTbGcHnuJqYkENBEBFu4ppQPaHYznLdsdcdAx1+Pd4WIqW C0XyJon1KQfdUTaVTjbc8CqEvbWoU+EiZj/tu/cxljzdPJnndLIO1vtXYoKvwOI= =OW52 -----END PGP SIGNATURE----- --pgp+signed+u6V89wpXQfDprP8--