From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
To: cygwin-apps@cygwin.com
Subject: [PATCH] cygport install infinite loop when symlink in path
Date: Mon, 13 Jul 2020 07:11:17 -0600 [thread overview]
Message-ID: <20200713131116.18339-1-Brian.Inglis@SystematicSW.ab.ca> (raw)
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
next reply other threads:[~2020-07-13 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 13:11 Brian Inglis [this message]
2020-07-13 16:18 ` Doug Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200713131116.18339-1-Brian.Inglis@SystematicSW.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).