Lots of juicy updates
[pkgusr] / usr / lib / pkgusr / update-pkg-project
index e0d9f40..1ff1f19 100755 (executable)
@@ -17,11 +17,17 @@ 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 -f ${pkgawk} | xargs stat --printf "%U:%G\n"
+           awk -f ${pkgawk} | xargs -r stat --printf "%U:%G\n"
        fi
     done|sort -u|tr -s '\n' ' '
 }
 
+# Look for anything in /usr/lib/deprecated
+list_deprecated()
+{
+    find /usr/lib/deprecated -type f -user ${pkg} -printf "  %p\n"
+}
+
 # Update deps and date
 TIMESTAMP=$(date +%c)
 DEPS=$(upd_pkg_deps)
@@ -36,6 +42,17 @@ echo "--------" >> ${pkgdir}/.projtmp
 
 # Add up to date file list
 list_package ${pkg} >> ${pkgdir}/.projtmp
+
+# Deprecated libs
+DEPRECATED=$(list_deprecated)
+if [ -n "${DEPRECATED}" ]; then
+    cat>>${pkgdir}/.projtmp<<EOF
+
+DEPRECATED LIBRARIES (remember to audit)
+$DEPRECATED
+EOF
+fi
+
 mv ${pkgdir}/.projtmp ${pkgdir}/.project
 
 # If we're root, chown the .project file