From 60037371809ab782c2d675ea1bfc849c2772fce2 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 2 Sep 1999 20:43:22 +0000 Subject: [PATCH] r264: * dh_shlibdeps: Fixed quoting problem that made it fail on weird file names. Patch from Devin Carraway , Closes: #44016 --- debian/changelog | 7 +++++++ dh_shlibdeps | 42 +++++++++++++++++++++++------------------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d8dc8a..8e15c7e 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 , Closes: #44016 + + -- Joey Hess 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 e30c4a5..bd733b3 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); + } +} -- 2.39.2