[X2Go-Commits] [x2goclient] 60/280: deduplicate.sh: add first skeleton for library dependency rewriting of deleted duplicates.

git-admin at x2go.org git-admin at x2go.org
Wed Jan 18 12:25:05 CET 2017


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

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

commit 2ecf4449705a1d39a614b23fba6fe380482cff73
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Aug 27 03:57:10 2015 +0200

    deduplicate.sh: add first skeleton for library dependency rewriting of deleted duplicates.
---
 debian/changelog |    2 ++
 deduplicate.sh   |   30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 07bdf19..36d93b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -137,6 +137,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       library dependencies if no error occurred.
     - deduplicate.sh: non-functional: change WARNING to ERROR in error
       messages.
+    - deduplicate.sh: add first skeleton for library dependency rewriting of
+      deleted duplicates.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/deduplicate.sh b/deduplicate.sh
index 41d2cbf..ddf5984 100755
--- a/deduplicate.sh
+++ b/deduplicate.sh
@@ -133,3 +133,33 @@ for entry in ${duplicates[@]}; do
 		fi
 	done
 done
+
+# Try to fixup files broken by duplicates removal.
+for all_entry in ${all_files[@]}; do
+	typeset otool_out="$(otool -L "${all_entry}")"
+
+	typeset dependencies="$(parse_otool_output "${otool_out}")"
+	if [ "${?}" -eq 0 ]; then
+		typeset line=""
+		while read -r line; do
+			typeset dependencies_filename="$(basename "${line}")"
+
+			typeset duplicate_entry=""
+			for duplicate_entry in ${duplicates[@]}; do
+				typeset duplicate_filename="$(basename "${duplicate_entry}")"
+
+				if [ -n "${dependencies_filename}" ] && [ -n "${duplicate_filename}"]; then
+					
+				else
+					echo "ERROR: empty file name while duplicates with dependencies." >&2
+					echo "ERROR: duplicate entry: \"${duplicate_entry}\"" >&2
+					echo "ERROR: dependency: \"${line}\"" >&2
+					exit 1
+				fi
+			done
+		done <<< "${dependencies}"
+	else
+		echo "ERROR: otool returned error for file: ${all_entry}" >&2
+		exit 1
+	fi
+done

--
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