All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] infra/pkg-generic: use readlink instead of realpath
@ 2018-12-01 21:51 Yann E. MORIN
  2018-12-06 21:19 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2018-12-01 21:51 UTC (permalink / raw)
  To: buildroot

realpath is missing on oldish distributions, like Debian 7, which is
still sued in the wild.

Use readlink instead; that has been available since the dawn of ages now
(well, coreutils had it in 2003).

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/pkg-generic.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 649a7ad187..6a0c9377ca 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -280,8 +280,8 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
 				-e "s,^\(exec_\)\?prefix=.*,\1prefix=@STAGING_DIR@/usr,g" \
 				-e "s,-I/usr/,-I at STAGING_DIR@/usr/,g" \
 				-e "s,-L/usr/,-L at STAGING_DIR@/usr/,g" \
-				-e 's, at STAGING_DIR@,$$(dirname $$(realpath -e $$0))/../..,g' \
-				-e 's, at HOST_DIR@,$$(dirname $$(realpath -e $$0))/../../../..,g' \
+				-e 's, at STAGING_DIR@,$$(dirname $$(readlink -e $$0))/../..,g' \
+				-e 's, at HOST_DIR@,$$(dirname $$(readlink -e $$0))/../../../..,g' \
 				-e "s, at BASE_DIR@,$(BASE_DIR),g" \
 				$(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
 	fi
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] infra/pkg-generic: use readlink instead of realpath
  2018-12-01 21:51 [Buildroot] [PATCH] infra/pkg-generic: use readlink instead of realpath Yann E. MORIN
@ 2018-12-06 21:19 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-12-06 21:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  1 Dec 2018 22:51:55 +0100, Yann E. MORIN wrote:
> realpath is missing on oldish distributions, like Debian 7, which is
> still sued in the wild.
> 
> Use readlink instead; that has been available since the dawn of ages now
> (well, coreutils had it in 2003).
> 
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/pkg-generic.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Seems like I forgot to say that I had applied this patch, on December
2. So: applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-06 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 21:51 [Buildroot] [PATCH] infra/pkg-generic: use readlink instead of realpath Yann E. MORIN
2018-12-06 21:19 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.