* [dpdk-dev] [PATCH] scripts: fix relpath.sh output when $prefix is set in environment
@ 2015-12-11 12:44 Panu Matilainen
2015-12-11 13:04 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Panu Matilainen @ 2015-12-11 12:44 UTC (permalink / raw)
To: dev
When relpath.sh is called from install target with prefix set, eg
"make install DESTDIR=/tmp/dpdk-root prefix=/usr", the prefix
from the environment leaks to relpath.sh internal helper variable and
causes incorrect symlinks to be generated in sdk $(targetdir):
include -> /usr../../../include/dpdk
lib -> /usr../../../lib
Initialize the local variable to empty to avoid side-effects from
environment.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
scripts/relpath.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/relpath.sh b/scripts/relpath.sh
index 7d2f48f..4ff4671 100755
--- a/scripts/relpath.sh
+++ b/scripts/relpath.sh
@@ -61,6 +61,8 @@ right2=${REL2#*/}
prev_right2=$REL2
prev_left2=
+prefix=
+
while [ "${right1}" != "" -a "${right2}" != "" ]; do
if [ "$left1" != "$left2" ]; then
--
2.5.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] scripts: fix relpath.sh output when $prefix is set in environment
2015-12-11 12:44 [dpdk-dev] [PATCH] scripts: fix relpath.sh output when $prefix is set in environment Panu Matilainen
@ 2015-12-11 13:04 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-12-11 13:04 UTC (permalink / raw)
To: Panu Matilainen; +Cc: dev
2015-12-11 14:44, Panu Matilainen:
> When relpath.sh is called from install target with prefix set, eg
> "make install DESTDIR=/tmp/dpdk-root prefix=/usr", the prefix
> from the environment leaks to relpath.sh internal helper variable and
> causes incorrect symlinks to be generated in sdk $(targetdir):
>
> include -> /usr../../../include/dpdk
> lib -> /usr../../../lib
>
> Initialize the local variable to empty to avoid side-effects from
> environment.
>
> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Good catch!
Fixes: 6b62a72a70d0 ("mk: install a standard cutomizable tree")
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-11 13:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 12:44 [dpdk-dev] [PATCH] scripts: fix relpath.sh output when $prefix is set in environment Panu Matilainen
2015-12-11 13:04 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).