tazwok rev 540 4.3

tazwok: Moved libs variable to update_lib_db function. Fixed a typo.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Jul 06 12:24:43 2011 +0000 (2011-07-06)
parents 6b76b34dbe1b
children 5dbe2cc5a2e1
files tazwok
line diff
     1.1 --- a/tazwok	Mon May 23 20:45:06 2011 +0000
     1.2 +++ b/tazwok	Wed Jul 06 12:24:43 2011 +0000
     1.3 @@ -1096,6 +1096,17 @@
     1.4  	return 1
     1.5  }
     1.6  
     1.7 +update_lib_db()
     1.8 +{
     1.9 +	# Update lib_db
    1.10 +	libs=$(for file in $(find * -type f); do
    1.11 +	[ "$(dd if=$file bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] || continue
    1.12 +		LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $PWD/$file
    1.13 +	done | { cut -f 1 -d ' ' | tr -d '\t' | sort -u | \
    1.14 +	sed -e 's/^linux-gate.so.*$/SLIB/' -e 's~^/lib/ld-.*$~SLIB~' \
    1.15 +		-e '/^statically$/d' | tr '\n' ' '; })
    1.16 +}
    1.17 +
    1.18  # Create a package tree and build the gziped cpio archive
    1.19  # to make a SliTaz (.tazpkg) package.
    1.20  gen_package()
    1.21 @@ -1228,14 +1239,8 @@
    1.22  		report end-step
    1.23  	fi
    1.24  
    1.25 -	# Update lib_db
    1.26 -	libs=$(for file in $(find * -type f); do
    1.27 -	[ "$(dd if=$file bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] || continue
    1.28 -		LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $PWD/$file
    1.29 -	done | { cut -f 1 -d ' ' | tr -d '\t' | sort -u | \
    1.30 -	sed -e 's/^linux-gate.so.*$/SLIB/' -e 's~^/lib/ld-.*$~SLIB~' \
    1.31 -		-e '/^statically$/d' | tr '\n' ' '; })
    1.32 -
    1.33 +	update_lib_db
    1.34 +	
    1.35  	sed "/$PACKAGE\t/d" -i $lib_db
    1.36  	if [ "$libs" ]; then
    1.37  		libs=$(echo " $libs" | sed -r 's/( SLIB)+ / /g')
    1.38 @@ -2208,7 +2213,7 @@
    1.39  	fi
    1.40  
    1.41  	report step "Moving incoming packages to main repository"
    1.42 -	[ "save_wok" ] && mkdir -p $PACKAGES_REPOSITORY/wok
    1.43 +	[ "$save_wok" ] && mkdir -p $PACKAGES_REPOSITORY/wok
    1.44  	unset EXTRAVERSION
    1.45  	for PACKAGE in $incoming_pkgs; do
    1.46  			prev_VERSION=$(get_pkg_version $PACKAGES_REPOSITORY)