Skip to content
Snippets Groups Projects
Commit 66ba5daf authored by Martin Pitt's avatar Martin Pitt
Browse files

pg_wrapper: Find libreadline in multiarch directory, too.

(Closes: #640520)
parent 270898e7
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ postgresql-common (122) UNRELEASED; urgency=low
* debian/control: Fix duplicate package description. (Closes: #639562)
* debian/control: Add lsb-release dependency to -server-dev-all, as the
pg_buildext tool needs it.
* pg_wrapper: Find libreadline in multiarch directory, too.
(Closes: #640520)
-- Martin Pitt <mpitt@debian.org> Sun, 28 Aug 2011 17:19:28 +0200
......
......@@ -99,7 +99,13 @@ my $cmd = get_program_path ($cmdname, $version);
# libreadline is a lot better than libedit, so prefer that
if ($cmdname eq 'psql') {
my @readlines = sort(</lib/libreadline.so.*>);
my @readlines;
my $multiarch = `dpkg-architecture -qDEB_HOST_MULTIARCH`;
chomp $multiarch;
if ($multiarch) {
push @readlines, sort(</lib/$multiarch/libreadline.so.*>);
}
push @readlines, sort(</lib/libreadline.so.*>);
if (@readlines) {
$ENV{'LD_PRELOAD'} = ($ENV{'LD_PRELOAD'} or '') . ':' . $readlines[-1];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment