summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2013-06-10 16:56:35 +0200
committerSimon Rettberg2013-06-10 16:56:35 +0200
commit7cc24161052f2127f906ed1c1cd9564959ef9f25 (patch)
treeca08bdd7a8be04fb04be7086cdca60cc7f7526ed
parent[systemd] patch PATH environment variable in systemd-src (diff)
downloadtm-scripts-7cc24161052f2127f906ed1c1cd9564959ef9f25.tar.gz
tm-scripts-7cc24161052f2127f906ed1c1cd9564959ef9f25.tar.xz
tm-scripts-7cc24161052f2127f906ed1c1cd9564959ef9f25.zip
[binutil.h] Consider $REQUIRED_LDD_BLACKLIST when fetching dynamic dependencies
[kdm] Blacklist libQtWebKit - it's 25M and of no use (yet?)
-rw-r--r--helper/binutil.inc4
-rw-r--r--remote/modules/kdm/kdm.conf2
-rwxr-xr-xremote/setup_target18
3 files changed, 12 insertions, 12 deletions
diff --git a/helper/binutil.inc b/helper/binutil.inc
index 9ad9e104..497ae75b 100644
--- a/helper/binutil.inc
+++ b/helper/binutil.inc
@@ -18,7 +18,7 @@
#
############################################################
# We use a blacklist mechanism to exclude common libraries.
-# This improve runtime quite a bit...
+# This improves runtime quite a bit...
BLACKLIST="ld-linux linux-gate linux-vdso libc.so"
# Initialise flag and path for local search
@@ -59,7 +59,7 @@ get_dynamic_dependencies() {
local LDD_OUT="ldd_output"
if ldd "$BINARY" > "$LDD_OUT"; then
# Case 1: file is a dynamic executable
- for LIB in $(cat "$LDD_OUT" | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do
+ for LIB in $(grep -v "${CURRENT_BLACKLIST}${REQUIRED_LDD_BLACKLIST}" "$LDD_OUT" | awk '{print $1 $2 $3}'); do
# split the entry into an array, ex:
# libm.so.6 => /lib/libm.so.6 would be split into:
# LIBLINK[0] LIBLINK[1]
diff --git a/remote/modules/kdm/kdm.conf b/remote/modules/kdm/kdm.conf
index d59f0009..dd054cc2 100644
--- a/remote/modules/kdm/kdm.conf
+++ b/remote/modules/kdm/kdm.conf
@@ -30,4 +30,4 @@ REQUIRED_SYSTEM_FILES=" /usr/share/icons/oxygen/16x16/actions/system-reboot.png
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
/usr/share/icons/default/index.theme"
-
+REQUIRED_LDD_BLACKLIST="\|libQtWebKit"
diff --git a/remote/setup_target b/remote/setup_target
index 369cdbac..286daf3a 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -46,11 +46,11 @@ read_build () {
copy_files_with_deps () {
- [ ! -d $MODULE_BUILD_DIR ] && pinfo "No build directory found, skipping dependency copying" && return 0
- cd $MODULE_BUILD_DIR
+ [ ! -d "$MODULE_BUILD_DIR" ] && pinfo "No build directory found, skipping dependency copying" && return 0
+ cd "$MODULE_BUILD_DIR"
COPYFILES_LIST="list_wanted_stage3.2"
- [ -e ${COPYFILES_LIST} ] && rm ${COPYFILES_LIST}
+ [ -e "${COPYFILES_LIST}" ] && rm "${COPYFILES_LIST}"
[ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..."
@@ -58,7 +58,7 @@ copy_files_with_deps () {
do
local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a \( -type f -o -type l \) )
# only do if more than one candidate found
- if [ $(echo $FILE_CANDIDATES | wc -w) -gt 1 ]; then
+ if [ "$(echo $FILE_CANDIDATES | wc -w)" -gt 1 ]; then
pdebug "Candidates for $FILENAME are: $(echo $FILE_CANDIDATES)"
local FINAL_LIST=""
for FILE in $FILE_CANDIDATES; do
@@ -82,7 +82,7 @@ copy_files_with_deps () {
fi
for FILE in $FINAL_LIST; do
pdebug "* $FILE"
- strip $FILE || pwarning "Could not strip '${FILE}'"
+ strip "$FILE" || pwarning "Could not strip '${FILE}'"
get_link_chain "${MODULE_BUILD_DIR}/${FILE}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}"
get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${FILE}" >> "${COPYFILES_LIST}"
done
@@ -94,7 +94,7 @@ copy_files_with_deps () {
for LOCATION in $(find . -name ${LIB}.so\*)
do
pdebug "* $LOCATION"
- strip $LOCATION || pwarning "Could not strip '${LOCATION}'"
+ strip "$LOCATION" || pwarning "Could not strip '${LOCATION}'"
get_link_chain "${MODULE_BUILD_DIR}/${LOCATION}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}"
get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${LOCATION}" >> "${COPYFILES_LIST}"
done
@@ -141,10 +141,10 @@ generate_target() {
TARGET_BUILD_DIR="${MODE_DIR}/builds/${TARGET}"
[ -e "${ROOT_DIR}/logs/${TARGET}.size" ] && . "${ROOT_DIR}/logs/${TARGET}.size" || echo "declare -A BUILD_SIZE" >> "${ROOT_DIR}/logs/${TARGET}.size"
- [ -d $TARGET_DIR ] || perror "Given target directory does not exist: $TARGET_DIR"
+ [ -d "$TARGET_DIR" ] || perror "Given target directory does not exist: $TARGET_DIR"
- [[ $TARGET == builds || $TARGET == modules ]] && \
- perror "Target directory cannot be named 'builds' nor 'modules'."
+ [[ "$TARGET" == "builds" || "$TARGET" == "modules" ]] && \
+ perror "Target directory cannot be named 'builds' or 'modules'."
pinfo "Generating '$TARGET_BUILD_DIR' for '$TARGET'"