summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>1999-09-02 20:43:22 +0000
committerjoey <joey>1999-09-02 20:43:22 +0000
commit60037371809ab782c2d675ea1bfc849c2772fce2 (patch)
tree7cbc1dcc5bb226c99c867df4d93e921c48aa7a2d
parent0bf37235c2e1ac184e6b069f0da2c71dd47b2983 (diff)
r264: * dh_shlibdeps: Fixed quoting problem that made it fail on weird file names.
Patch from Devin Carraway <debianbug-debhelper@devin.com>, Closes: #44016
-rw-r--r--debian/changelog7
-rwxr-xr-xdh_shlibdeps42
2 files changed, 30 insertions, 19 deletions
diff --git a/debian/changelog b/debian/changelog
index 5d8dc8ab..8e15c7e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (2.0.29) unstable; urgency=low
+
+ * dh_shlibdeps: Fixed quoting problem that made it fail on weird file names.
+ Patch from Devin Carraway <debianbug-debhelper@devin.com>, Closes: #44016
+
+ -- Joey Hess <joeyh@master.debian.org> Thu, 2 Sep 1999 13:40:37 -0700
+
debhelper (2.0.28) unstable; urgency=low
* Oops, dh_installpam was omitted from the package. Added back.
diff --git a/dh_shlibdeps b/dh_shlibdeps
index e30c4a5b..bd733b37 100755
--- a/dh_shlibdeps
+++ b/dh_shlibdeps
@@ -1,24 +1,28 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Find dependancies. Simple dpkg-shlibdeps wrapper.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
- EXT=`pkgext $PACKAGE`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $EXT=pkgext($PACKAGE);
- # Run dpkg-shlibdeps to generate dependancies.
- filelist=""
- for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do
- case "`file $file`" in
- *ELF*)
- filelist="$file $filelist"
- ;;
- esac
- done
- if [ "$filelist" ]; then
- doit "dpkg-shlibdeps -Tdebian/${EXT}substvars $DH_U_PARAMS $filelist"
- fi
-done
+ my @filelist;
+ my $ff;
+
+ # Generate a list of all ELF binaries in the package.
+ foreach $file (split(/\n/,`find $TMP -type f \\( -perm +111 -or -name "*.so*" \\)`)) {
+ # TODO: this is slow, optimize. Ie, file can run once on multiple files..
+ $ff=`file "$file"`;
+ if ($ff=~m/ELF/) {
+ push @filelist,$file;
+ }
+ }
+
+ if (@filelist) {
+ doit("dpkg-shlibdeps","-Tdebian/$EXT\substvars",@{$dh{U_PARAMS}},@filelist);
+ }
+}