r54084 - in /desktop/unstable/gobject-introspection/debian: changelog dh_girepository

bigon at users.alioth.debian.org bigon at users.alioth.debian.org
Mon Sep 25 12:16:33 UTC 2017


Author: bigon
Date: Mon Sep 25 12:16:31 2017
New Revision: 54084

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=54084
Log:
debian/dh_girepository: Try to find the minimal required version for a gir
package by also looking at the minimal version of the package containing
the .gir file (Closes: #640893)

Modified:
    desktop/unstable/gobject-introspection/debian/changelog
    desktop/unstable/gobject-introspection/debian/dh_girepository

Modified: desktop/unstable/gobject-introspection/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gobject-introspection/debian/changelog?rev=54084&op=diff
==============================================================================
--- desktop/unstable/gobject-introspection/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gobject-introspection/debian/changelog	[utf-8] Mon Sep 25 12:16:31 2017
@@ -1,3 +1,11 @@
+gobject-introspection (1.54.0-3) UNRELEASED; urgency=medium
+
+  * debian/dh_girepository: Try to find the minimal required version for a gir
+    package by also looking at the minimal version of the package containing
+    the .gir file (Closes: #640893)
+
+ -- Laurent Bigonville <bigon at debian.org>  Mon, 25 Sep 2017 14:14:03 +0200
+
 gobject-introspection (1.54.0-2) unstable; urgency=medium
 
   * Update dh_girepository to no longer generate a dependency on

Modified: desktop/unstable/gobject-introspection/debian/dh_girepository
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gobject-introspection/debian/dh_girepository?rev=54084&op=diff
==============================================================================
--- desktop/unstable/gobject-introspection/debian/dh_girepository	[utf-8] (original)
+++ desktop/unstable/gobject-introspection/debian/dh_girepository	[utf-8] Mon Sep 25 12:16:31 2017
@@ -20,6 +20,13 @@
 shipping GObject introspection data.
 
 The dependencies are generated in the ${gir:Depends} substitution variable.
+
+The minimal version of the generated dependencies is calculated by looking
+first at the version of the packages declared in the build-dependencies of the
+building package. If a package is not declared in the build-dependencies, the
+minimal version of that package is calculated by looking at the version of the
+package containing the corresponding .gir file defined in the
+build-dependencies.
 
 Note that dh_girepository will not be executed automatically by dh; you
 need to use C<dh $@ --with gir> for C<dh> to include it.
@@ -57,7 +64,7 @@
 
 =head1 CONFORMS TO
 
-GObject introspection mini policy as of 2010-12-07.
+GObject introspection mini policy as of 2011-03-30.
 
 =cut
 
@@ -158,8 +165,8 @@
         $fullpath = "$typelibdir/$req";
 
         verbose_print ("Dependency: $req");
-        foreach my $girdir (@girdirs) {
-            if (-f tmpdir($package)."$girdir/$req") {
+        foreach my $typelibdir (@typelibdirs) {
+            if (-f tmpdir($package)."$typelibdir/$req") {
                 verbose_print("  found in the same package");
                 return;
             }
@@ -191,6 +198,26 @@
                     if ($1 eq $deppkg) {
                         addsubstvar ($package, "gir:Depends", $1, $2);
                         $found = 1;
+                    }
+                }
+            }
+            if (! $found) {
+                my $fullpath_gir = "";
+                (my $req_gir = $req) =~ s/\.typelib$/\.gir/;
+                foreach my $girdir (@girdirs) {
+                    if (-f "$girdir/$req_gir") {
+                        $fullpath_gir = "$gir_path/$req_gir";
+                        my @output_gir = (split ':', `dpkg -S $fullpath_gir 2>/dev/null`);
+                        error("$fullpath_gir does not belong to any package") unless @output_gir;
+                        my $deppkg_gir = $output_gir[0];
+                        foreach my $bdep (@bdeps) {
+                            if ($bdep =~ /^\s*([a-z0-9\._\-\+]+)\s*\((.*)\)/) {
+                                if ($1 eq $deppkg_gir) {
+                                    addsubstvar ($package, "gir:Depends", $deppkg, $2);
+                                    $found = 1;
+                                }
+                            }
+                        }
                     }
                 }
             }




More information about the pkg-gnome-commits mailing list