public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] cygport install infinite loop when symlink in path
@ 2020-07-13 13:11 Brian Inglis
  2020-07-13 16:18 ` Doug Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Inglis @ 2020-07-13 13:11 UTC (permalink / raw)
  To: cygwin-apps

src_postinstall(_prep_libtool_modules): infinite loop when symlink in path
added readlink to also resolve symlinks in path to DEST host prefix
---
 lib/src_postinst.cygpart | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 68381a0..091994a 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -1293,8 +1293,10 @@ __prep_libtool_modules() {
 					mv ${ltlibdir}/${dlname} ${D}/usr/${CTARGET}/sys-root/$(__target_prefix)/bin/
 				else
 					origdlname=${dlname}
+					# do full symlink resolution on both paths compared to avoid issues
+					local dest_prefix=$(readlink -f ${D}$(__host_prefix))
 
-					while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != ${D}$(__host_prefix) ]
+					while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != $dest_prefix ]
 					do
 						dlname=../${dlname}
 					done
-- 
2.27.0


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

end of thread, other threads:[~2020-07-13 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 13:11 [PATCH] cygport install infinite loop when symlink in path Brian Inglis
2020-07-13 16:18 ` Doug Henderson

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 read-only IMAP folder(s) and NNTP newsgroup(s).