X-Git-Url: http://cgit.sxemacs.org/?p=pkgusr;a=blobdiff_plain;f=usr%2Flib%2Fpkgusr%2Fupdate-pkg-project;h=e0d9f4001f5c8e4747be7b3072fcb9257a87dfd3;hp=feef54966c769727398e3fffee0ae20402f57fbb;hb=255d22136a046d5233084b1473bc9cf344170ae9;hpb=bc3bc793c4cdda1acbe8cd211e26dacd9b9e9835 diff --git a/usr/lib/pkgusr/update-pkg-project b/usr/lib/pkgusr/update-pkg-project index feef549..e0d9f40 100755 --- a/usr/lib/pkgusr/update-pkg-project +++ b/usr/lib/pkgusr/update-pkg-project @@ -10,16 +10,14 @@ if [ -z "${pkg}" ]; then fi pkgdir=/usr/src/${pkg} +pkgawk=/usr/lib/pkgusr/pkgdeps.awk upd_pkg_deps() { for file in $(forall_direntries_from $pkg -type f -executable -readable); do if readelf -d $file &>/dev/null && ldd $file &>/dev/null; then (readelf -d $file ; ldd $file ) | - awk '/NEEDED/ { lib=substr($5,2,length($5)-2); LIBS[lib]=$5 } \ - /.*=>/ {if ( $1 in LIBS ) LIBS[$1]=$3 } END \ - { for (lib in LIBS) print LIBS[lib] }' | - xargs stat --printf "%U:%G\n" + awk -f ${pkgawk} | xargs stat --printf "%U:%G\n" fi done|sort -u|tr -s '\n' ' ' } @@ -42,3 +40,4 @@ mv ${pkgdir}/.projtmp ${pkgdir}/.project # If we're root, chown the .project file [[ $(id -u) -eq 0 ]] && chown -v ${pkg}:${pkg} ${pkgdir}/.project +exit 0