Re: Problem with dpkg-shlibdeps
Russ Allbery <rra@debian.org> wrote:
> Frank Küster <frank@debian.org> writes:
>
>> No, I've found out now (Use the source, conveniently dpkg-shlibdeps is
>> a Perl script): I was the DEBIAN directory in the package directory
>> which was missing, and which made dpkg-shlibdeps _think_ that it
>> wasn't a package directory.
>>
>> Simply calling dh_installdeb before dh_shlibdeps fixed it; it wasn't me
>> who wrote that debian/rules and I have no idea whether it used to work.
>
> It looks like dh runs dh_shlibdeps before dh_installdeb, so I would have
> expected more people to run into this.
Hm.
>From dpkg-1.15.2/scripts/dpkg-shlibdeps.pl:
if (my $relname = relative_to_pkg_root($file)) {
my $parent_dir = "/" . dirname($relname);
$in_public_dir = (grep { $parent_dir eq $_ } @librarypaths) ? 1 : 0;
} else {
warning(_g("binaries to analyze should already be " .
"installed in their package's directory."));
}
relative_to_pkg_root is included from Dpkg::Path.
>From dpkg-1.15.2/scripts/Dpkg/Path.pm:
=item relative_to_pkg_root($file)
Returns the filename relative to get_pkg_root_dir($file).
=cut
sub relative_to_pkg_root($) {
my $file = shift;
my $pkg_root = get_pkg_root_dir($file);
if (defined $pkg_root) {
$pkg_root .= "/";
return $file if ($file =~ s/^\Q$pkg_root\E//);
}
return undef;
}
and
sub get_pkg_root_dir($) {
my $file = shift;
$file =~ s{/+$}{};
$file =~ s{/+[^/]+$}{} if not -d $file;
while ($file) {
return $file if -d "$file/DEBIAN";
last if $file !~ m{/};
$file =~ s{/+[^/]+$}{};
}
return undef;
}
Maybe some other tool "usually" also creates DEBIAN, but not in my case?
Regards, Frank
--
Dr. Frank Küster
Debian Developer (TeXLive)
VCD Aschaffenburg-Miltenberg, ADFC Miltenberg
B90/Grüne KV Miltenberg
Reply to: