From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) by sourceware.org (Postfix) with ESMTPS id AEB22386181F for ; Mon, 13 Jul 2020 13:11:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AEB22386181F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSW.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca Received: from BWINGLISD.cg.shawcable.net ([24.64.172.44]) by shaw.ca with ESMTP id uyF3jASHE62bruyF4j3NAd; Mon, 13 Jul 2020 07:11:35 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=s65VDQUBSGUqEhDE5UoA:9 From: Brian Inglis To: cygwin-apps@cygwin.com Subject: [PATCH] cygport install infinite loop when symlink in path Date: Mon, 13 Jul 2020 07:11:17 -0600 Message-Id: <20200713131116.18339-1-Brian.Inglis@SystematicSW.ab.ca> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfB6V+o2j8aFE6wjlOmOWBHH0u61mBoX9EciooC6RwKzdJzNoWGFr6s9jWRLvgXHbVlNO6Knz0FfbA1+MYWsVkjivoCeBcIZi7sEUXulUY7myrDIlkcGf zxAjLdPw2gdiEJj5dFBOLkUafqttfWKC0wFNcYagHN0adKsEDtxhvg8tCpcFoneOoD0eEVhNTaAqrSDSB68Ci75Az+8VDIuLsloxcaCqMk2pOQ7EqEcLGWOt t+EiWClk0s6A/dFH051+0Q== X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 13:11:37 -0000 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