Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Cc: "Marty E. Plummer" <hanetzer@×××××××××.com>
Subject: Re: [gentoo-dev] [PATCH] linux-info.eclass: account for lack of trailing slash
Date: Sat, 14 Jul 2018 06:21:54
Message-Id: 23369.38518.32731.496320@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] [PATCH] linux-info.eclass: account for lack of trailing slash by "Marty E. Plummer"
1 >>>>> On Fri, 13 Jul 2018, Marty E Plummer wrote:
2
3 > In EAPI 7, D, ED, ROOT, EROOT no longer have a trailing slash[1]. This
4 > makes finding /usr/src/linux not work properly as it currently stands.
5
6 > Use the form "${ROOT%/}/" where apropos in order to unify behavior across
7 > EAPIs.
8
9 > 1: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-113001r7
10
11 Please use https://projects.gentoo.org/pms/7/pms.html if you want the
12 fragment identifier to be stable (which is not guaranteed for the
13 version in my home directory).
14
15 > @@ -554,7 +554,7 @@ get_version() {
16 > # caught before this if they are.
17 > if [[ -z ${OUTPUT_DIR} ]] ; then
18 > # Try to locate a kernel that is most relevant for us.
19 > - for OUTPUT_DIR in "${SYSROOT}" "${ROOT}" "" ; do
20 > + for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}/" "" ; do
21
22 Shouldn't it be "${ROOT%/}" here? Otherwise OUTPUT_DIR may begin with
23 a double slash.
24
25 > OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build"
26 > if [[ -e ${OUTPUT_DIR} ]] ; then
27 > break

Replies

Subject Author
Re: [gentoo-dev] [PATCH] linux-info.eclass: account for lack of trailing slash "Marty E. Plummer" <hanetzer@×××××××××.com>
[gentoo-dev] [PATCH v2] linux-info.eclass: account for lack of trailing slash "Marty E. Plummer" <hanetzer@×××××××××.com>