]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1586: * dh_python: patch from Josselin to fix generated depends. Closes: #204717 version_4.1.63
authorjoey <joey>
Mon, 11 Aug 2003 19:32:50 +0000 (19:32 +0000)
committerjoey <joey>
Mon, 11 Aug 2003 19:32:50 +0000 (19:32 +0000)
   * dh_pythn: also stylistic and tab damage fixes

autoscripts/postinst-suid
debian/changelog
dh_python

index d0d16c06d2763382e5b033fc1b98f9c7586bc519..db4bc6ddbca64e2d8dd0f4750b7d745b7a2858fa 100644 (file)
@@ -2,7 +2,7 @@ if [ "$1" = "configure" ]; then
        if which suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
                suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
        elif [ -e /#FILE# ]; then
-               chown #OWNER#.#GROUP# /#FILE#
+               chown #OWNER#:#GROUP# /#FILE#
                chmod #PERMS# /#FILE#
        fi
 fi
index 7b6585a3171f077e0540ef46dfbd93b7b96e6168..65e14054c6acd2abd21fdd40b8f1892f523656e5 100644 (file)
@@ -1,3 +1,10 @@
+debhelper (4.1.63) unstable; urgency=low
+
+  * dh_python: patch from Josselin to fix generated depends. Closes: #204717
+  * dh_pythn: also stylistic and tab damage fixes
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 11 Aug 2003 15:33:16 -0400
+
 debhelper (4.1.62) unstable; urgency=low
 
   * Fix a bug in quoted section parsing that put the quotes in the parsed
index 9bbffa4c3c127fc38fc415b360b2ec886b442f4f..f677ee2ee9c866ee66aeb2c2209d460a4951c55a 100755 (executable)
--- a/dh_python
+++ b/dh_python
@@ -98,8 +98,27 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
        delsubstvar($package, "python:Depends");
 
-       # Check for current python dependencies
        my @dirs = ("usr/lib/site-python", "usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV );
+
+       my $dep_on_python = 0;
+       my $strong_dep = 0;
+       my $look_for_pythonXY = 1;
+
+       # First, the case of python-foo
+       if ($package =~ /^python-/) {
+               $dep_on_python = 1;
+               $strong_dep = 1;
+               my $pack = $package;
+               $pack =~ s/^python/python$python_version/;
+               if (grep { "$_" eq "$pack" } GetPackages()) {
+                       addsubstvar($package, "python:Depends", $pack);
+               }
+               else {
+                       push @dirs, "usr/lib/python$python_version/site-packages" ;
+                       $look_for_pythonXY = 0;
+               }
+       }
+
        @dirs = grep -d, map "$tmp/$_", @dirs;
 
        my $deps = 0;
@@ -141,19 +160,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        # Dependencies on current python
-       my $dep_on_python = 0;
-       my $strong_dep = 0;
        $dep_on_python = 1 if $deps;
        $strong_dep = 1 if($deps & PY_MODULE);
-       if ($package =~ /^python-/) {
-               my $pack = $package;
-               $pack =~ s/^python/python$python_version/;
-               if (grep { "$_" eq "$pack" } GetPackages()) {
-                       addsubstvar($package, "python:Depends", $pack);
-                       $dep_on_python = 1;
-                       $strong_dep = 1;
-               }
-       }
+
        if ($dep_on_python) {
                addsubstvar($package, "python:Depends", $python, ">= $python_version");
                if ($strong_dep) {
@@ -168,13 +177,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # Look for specific pythonX.Y modules
        foreach my $pyver (@python_allversions) {
                my $pydir="/usr/lib/$pyver/site-packages";
-               if (grep -d,"$tmp$pydir") {
-                       find sub {
-                               return unless -f;
-                               $verdeps{$pyver} |= PY_MODULE if /\.py$/;
-                       }, "$tmp$pydir";
+               if ($look_for_pythonXY) {
+                       if (grep -d,"$tmp$pydir") {
+                               find sub {
+                                       return unless -f;
+                                       $verdeps{$pyver} |= PY_MODULE if /\.py$/;
+                               }, "$tmp$pydir";
+                       }
                }
-               
+       
                # Go for the dependencies
                addsubstvar($package, "python:Depends", $pyver) if $verdeps{$pyver};