summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrevdep97
-rw-r--r--revdep.146
2 files changed, 0 insertions, 143 deletions
diff --git a/revdep b/revdep
deleted file mode 100755
index fbae8f4..0000000
--- a/revdep
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-
-#
-# revdep - check library and executable linking for issues after
-# package upgrades
-#
-# Johannes Winkelmann, jw at tks6 dot net
-# Matt Housh, jaeger at morpheus dot net
-#
-# Usage:
-#
-# Formatted listing:
-# RD_VERBOSE=1 revdep
-# Include individual broken files in output:
-# RD_VERBOSE=2 revdep
-#
-# Pure list to be used as input to prt-get update:
-# revdep
-#
-# With an optional argument, only that port is checked:
-# revdep samba
-#
-
-#set -x
-
-get_lib_paths() {
- missing_files=($(ldd "$1" 2>/dev/null | awk '/not found/ { print $1 }'))
- (for file in ${missing_files[*]}; do \
- if [ "$file" != "" ]; then \
- dirname /$(pkginfo -o "$file" | awk 'NR==2 { print $2 }'); \
- fi; \
- done) | sort | uniq
-}
-
-check_linking() {
- #set -x
- err=0
-
- files="$(awk -v p="$1" -v RS="" '$1==p' /var/lib/pkg/db)"
- for f in $files; do
- if [ -f "/$f" ]; then
- if [ ! -r "/$f" ]; then
- [ "$RD_VERBOSE" = "2" ] && echo "$1: couldn't read $f"
- else
- file -b "/$f" | grep -q "shared"
- if [ $? -eq 0 ]; then
- ldd "/$f" 2>/dev/null | grep "not found" &>/dev/null
- if [ $? -eq 0 ]; then
- owner=$(pkginfo -o "/$f" | awk 'NR==2 { print $1 }')
- if [ "$owner" = "$1" ]; then
- lib_paths=($(get_lib_paths "/$f"))
- export IFS=$':'
- paths=$(echo "${lib_paths[*]}")
- unset IFS
- LD_LIBRARY_PATH=$paths:$LD_LIBRARY_PATH ldd "/$f" 2>/dev/null | grep "not found" &>/dev/null
- if [ $? -eq 0 ]; then
- [ "$RD_VERBOSE" = "2" ] && echo "$1: error in /$f"
- err=1
- fi
- else
- [ "$RD_VERBOSE" = "2" ] && echo "$1: error in /$f"
- err=1
- fi
- fi
- fi
- fi
- fi
- done
-
- return $err
-}
-
-[ -n "$RD_VERBOSE" ] && echo "** calculating deps"
-
-if [ -z "$1" ]; then
- ports=($(pkginfo -i| awk '{ print $1 }'))
- [ -n "$RD_VERBOSE" ] && echo "** Checking ${#ports[*]} ports"
-else
- ports=($@)
-fi
-
-[ -n "$RD_VERBOSE" ] && echo "** check linking"
-
-for d in ${ports[*]}; do
- check_linking $d
- if [ $? -ne 0 ]; then
- if [ -z "$RD_VERBOSE" ]; then
- echo "$d"
- elif [ "$RD_VERBOSE" = "1" ]; then
- echo "$d: error"
- fi
- else
- if [ -n "$RD_VERBOSE" ]; then
- echo "$d: ok"
- fi
- fi
-done
diff --git a/revdep.1 b/revdep.1
deleted file mode 100644
index fc947d4..0000000
--- a/revdep.1
+++ /dev/null
@@ -1,46 +0,0 @@
-." Text automatically generated by txt2man-1.4.7
-.TH revdep 1 "April 08, 2006" "" ""
-.SH NAME
-\fBrevdep \fP- check package linkage
-\fB
-.SH SYNOPSIS
-.nf
-.fam C
-\fBrevdep\fP [\fIpackagename\fP]
-.fam T
-.fi
-.SH DESCRIPTION
-Revdep checks for missing / wrong libraries of
-installed packages using \fBldd\fP(1).
-.SH OPTIONS
-\fBrevdep\fP verbosity can be adjusted with the RD_VERBOSE
-environment varable. Valid values are empty, '1' and '2'
-.SH EXAMPLES
-Formatted listing:
-.PP
-.nf
-.fam C
- RD_VERBOSE=1 revdep
-
-.fam T
-.fi
-Include errorous files:
-.PP
-.nf
-.fam C
- RD_VERBOSE=2 revdep
-
-.fam T
-.fi
-Pure list to be used as input to prt-get update
-.PP
-.nf
-.fam C
- revdep
-
-.fam T
-.fi
-.SH AUTHORS
-Johannes Winkelmann <jw@tks6.net>
-.SH SEE ALSO
-\fBpkginfo\fP(8), \fBprt-get\fP(8)

Generated by cgit