[X2Go-Commits] [x2goclient] 77/138: deduplicate.sh: surprisingly, it turned out that only checking the duplicate's basename against the current dependency's basename is not good enough.

git-admin at x2go.org git-admin at x2go.org
Thu Mar 31 20:58:31 CEST 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit c6bf20a9cb51f76a4bbb3bace0de88ef4cc90277
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Aug 27 20:43:31 2015 +0200

    deduplicate.sh: surprisingly, it turned out that only checking the duplicate's basename against the current dependency's basename is not good enough.
    
    Actually construct "the real dependency-format duplicate string" and
    check it against "the real dependency".
    
    Even this is still not good enough as it needs a bit cleanup - coming up
    next.
---
 debian/changelog |    5 +++++
 deduplicate.sh   |    7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index af393c6..73e084a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -143,6 +143,11 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
     - deduplicate.sh: copy lazy_canonical_path from macbuild.sh for now.
       deduplicate.sh will eventually be merged into macbuild.sh anyway.
     - deduplicate.sh: more temporary debugging output in fixup section.
+    - deduplicate.sh: surprisingly, it turned out that only checking the
+      duplicate's basename against the current dependency's basename is not
+      good enough. Actually construct "the real dependency-format duplicate
+      string" and check it against "the real dependency". Even this is still
+      not good enough as it needs a bit cleanup - coming up next.
 
   [ Mike DePaulo ]
   * New upstream release (4.0.5.2):
diff --git a/deduplicate.sh b/deduplicate.sh
index 12732a4..7df0698 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -174,18 +174,17 @@ for all_entry in "${all_files[@]}"; do
 	if [ "${?}" -eq 0 ]; then
 		typeset line=""
 		while read -r line; do
-			typeset dependencies_filename="$(basename "${line}")"
 			echo "dependency of ${all_entry}: ${line}"
 
 			typeset duplicate_entry=""
 			typeset -i i="0"
 			for i in "${!duplicates[@]}"; do
 				typeset duplicate_entry="${duplicates[${i}]}"
-				typeset duplicate_filename="$(basename "${duplicate_entry}")"
 				echo "checking for duplicate ${duplicate_entry}"
+				typeset duplicate_format="${dependency_base_format}/${duplicate_entry}"
 
-				if [ -n "${dependencies_filename}" ] && [ -n "${duplicate_filename}" ]; then
-					if [ "${dependencies_filename}" = "${duplicate_filename}" ]; then
+				if [ -n "${line}" ] && [ -n "${duplicate_format}" ]; then
+					if [ "${line}" = "${duplicate_format}" ]; then
 						echo "install_name_tool -change \"${line}\" \"${to_files[${i}]}\" \"${all_entry}\""
 					fi
 				else

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list