Hi!

On Fri, 2014-10-10 at 16:16:16 +0200, Jérémy Bobbio wrote:
> Package: dpkg-dev
> Version: 1.17.16
> Severity: minor
> Tags: patch
> User: reproducible-bui...@lists.alioth.debian.org
> Usertags: toolchain randomness

> In the Depends field of the control file of libgemanx-core0, one build
> has `libglib2.0-0 (>= 2.12.0)` while the other has
> `libglib2.0-0 (>= 2.16.0)`.
> 
> dpkg-shlibdeps outputs a warning, as it is actually a useless
> dependency. So the issue is probably a minor one. Here's my analysis and
> possible solution:
> 
> The minimal version numbers differ from one run to another because when
> the .symbols file is loaded, the order of the entries in the `libfiles`
> hash are random. Only the minimal required version for the first
> encountered shared library of a package will be currently used.
> 
> libglib2.0-0 exhibits the problem because libgio-2.0.so.0 has a minimal
> required version of 2.16.0, while all other shared libraries contained
> in the same package have a minimal required version of 2.12.0.

Indeed, thanks for the analysis…

> The attached patch uses `update_dependency_version` in order to raise
> the initial minimum required version for each shared libraries provided
> by the same package.

… and the patch!

And this can actually pose problems besides unreproducible output.

> diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
> index bda1e09..6caa6d8 100755
> --- a/scripts/dpkg-shlibdeps.pl
> +++ b/scripts/dpkg-shlibdeps.pl
> @@ -255,13 +255,9 @@ foreach my $file (keys %exec) {
>                  # package and we really need it)
>               my $dep = $symfile->get_dependency($soname);
>               my $minver = $symfile->get_smallest_version($soname) || '';
> -             foreach my $subdep (split /\s*,\s*/, $dep) {
> -                 if (not exists $dependencies{$cur_field}{$subdep}) {
> -                     $dependencies{$cur_field}{$subdep} = 
> Dpkg::Version->new($minver);
> -                        print " Initialize dependency ($subdep) with minimal 
> " .
> -                              "version ($minver)\n" if $debug > 1;
> -                 }
> -             }
> +             update_dependency_version($dep, $minver);
> +             print " Initialize dependencies ($dep) with minimal " .
> +                   "version ($minver)\n" if $debug > 1;

I've slightly reworded the debug message to match the other one after
an update_dependency_version() call. Merged locally, will be included
in today's upload.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to