]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1590: * Converted several chown 0.0 to chown 0:0 for POSIX 200112. version_4.1.65
authorjoey <joey>
Mon, 18 Aug 2003 01:21:26 +0000 (01:21 +0000)
committerjoey <joey>
Mon, 18 Aug 2003 01:21:26 +0000 (01:21 +0000)
   * dh_python: patch from Josselin to support packages only
     shipping binary (.so) modules, and removal of any already byte-compiled
     .py[co] found.

debian/changelog
dh_fixperms
dh_gencontrol
dh_installdeb
dh_installdocs
dh_makeshlibs
dh_md5sums
dh_python

index a51c88edf14896c103c646c6f008410b7aa00149..e5e06fe28589024a04b3fedd536d81e2ba9589c9 100644 (file)
@@ -1,3 +1,12 @@
+debhelper (4.1.65) unstable; urgency=low
+
+  * Converted several chown 0.0 to chown 0:0 for POSIX 200112.
+  * dh_python: patch from Josselin to support packages only
+    shipping binary (.so) modules, and removal of any already byte-compiled
+    .py[co] found.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 17 Aug 2003 21:11:35 -0400
+
 debhelper (4.1.64) unstable; urgency=low
 
   * dh_python: Add a -V flag to choose the python version modules in a package
index 1a35c78d0973300c1c844af373a7fe95789a650c..34a385bc6c8afe6f1ab073ea02b45547d9ada550 100755 (executable)
@@ -53,7 +53,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
        # General permissions fixing.
        complex_doit("find $tmp $find_options -print0",
-               "2>/dev/null | xargs -0r chown --no-dereference 0.0");
+               "2>/dev/null | xargs -0r chown --no-dereference 0:0");
        complex_doit("find $tmp ! -type l $find_options -print0",
                "2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s");
                
index 4e9ff3e892203357b29e6e02448c8fea738480be..b9aaefb490d59873823e1fe703268d7872af7ff5 100755 (executable)
@@ -64,7 +64,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # something odd.
        doit("chmod","644","$tmp/DEBIAN/control");
        
-       doit("chown","0.0","$tmp/DEBIAN/control");
+       doit("chown","0:0","$tmp/DEBIAN/control");
 }
 
 =head1 SEE ALSO
index 9527ff2e293459e6765351d6abd282ba90c05f3d..e25e17530fa89696d539bdb83073727db8351680 100755 (executable)
@@ -67,7 +67,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                                # script.
                                complex_doit("sed s/#DEBHELPER#// < $f > $tmp/DEBIAN/$file");
                        }
-                       doit("chown","0.0","$tmp/DEBIAN/$file");
+                       doit("chown","0:0","$tmp/DEBIAN/$file");
                        doit("chmod",755,"$tmp/DEBIAN/$file");
                }
                else {
@@ -76,7 +76,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (-f "debian/$ext$file.debhelper") {
                                complex_doit("printf '#!/bin/sh\nset -e\n' > $tmp/DEBIAN/$file");
                                complex_doit("cat debian/$ext$file.debhelper >> $tmp/DEBIAN/$file");
-                               doit("chown","0.0","$tmp/DEBIAN/$file");
+                               doit("chown","0:0","$tmp/DEBIAN/$file");
                                doit("chmod",755,"$tmp/DEBIAN/$file");
                        }
                }
index b991162f6787dff90afe432f00fd7774cc28e1a5..3fe3d0c43c581300e60f7921df4b6a214554eb52 100755 (executable)
@@ -125,7 +125,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                                doit("cp","-a",$doc,"$tmp/usr/share/doc/$package");
                        }
                }
-               doit("chown","-R","0.0","$tmp/usr/share/doc");
+               doit("chown","-R","0:0","$tmp/usr/share/doc");
                doit("chmod","-R","go=rX","$tmp/usr/share/doc");
                doit("chmod","-R","u+rw","$tmp/usr/share/doc");
        }
index ba5266b8204f02f6ac19fa66584b73315ea25e39..a888aecaa5e86f3378c7300a889bbb81cfaed23d 100755 (executable)
@@ -166,7 +166,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
        if (-e "$tmp/DEBIAN/shlibs") {
                doit("chmod",644,"$tmp/DEBIAN/shlibs");
-               doit("chown","0.0","$tmp/DEBIAN/shlibs");
+               doit("chown","0:0","$tmp/DEBIAN/shlibs");
        }
 }
 
index 6f794e7f670504266f5babce19ab7bad7dc64ba9..7d313220a58238caf752deb57bbabc1697219543 100755 (executable)
@@ -78,7 +78,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
        else {
                doit("chmod",644,"$tmp/DEBIAN/md5sums");
-               doit("chown","0.0","$tmp/DEBIAN/md5sums");
+               doit("chown","0:0","$tmp/DEBIAN/md5sums");
        }
 }
 
index 8b248ff6590015d3471369b76c421c1f5492471a..952a77d9293ead3c3c1d4503ae0bbce4ef25a098 100755 (executable)
--- a/dh_python
+++ b/dh_python
@@ -27,7 +27,8 @@ specific python version. The dependency will be substituted into your
 package's control file wherever you place the token "${python:Depends}".
 
 If some modules need to be byte-compiled at install time, appropriate
-postinst and prerm scripts will be generated.
+postinst and prerm scripts will be generated. If already byte-compiled
+modules are found, they are removed.
 
 If you use this program, your package should build-depend on python.
 
@@ -43,6 +44,9 @@ command line. By default, it will check /usr/lib/site-python,
 /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
 /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
 
+Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the
+extra names on the command line are searched for binary (.so) modules.
+
 =item B<-V> I<version>
 
 If the .py files your package ships are meant to be used by a specific
@@ -107,6 +111,8 @@ foreach (@ARGV) {
 use constant PROGRAM   => 1;
 use constant PY_MODULE => 2;
 use constant PY_MODULE_NONSTANDARD => 4;
+use constant SO_MODULE => 8;
+use constant SO_MODULE_NONSTANDARD => 16;
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp = tmpdir($package);
@@ -114,6 +120,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        delsubstvar($package, "python:Depends");
 
        my @dirs = ("usr/lib/site-python", "usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV );
+       my @dirs_so = ("usr/lib/site-python", @ARGV );
 
        my $dep_on_python = 0;
        my $strong_dep = 0;
@@ -130,11 +137,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                }
                else {
                        push @dirs, "usr/lib/python$python_version/site-packages" ;
+                       push @dirs_so, "usr/lib/python$python_version/site-packages" ;
                        $look_for_pythonXY = 0;
                }
        }
 
        @dirs = grep -d, map "$tmp/$_", @dirs;
+       @dirs_so = grep -d, map "$tmp/$_", @dirs_so;
 
        my $deps = 0;
        my %verdeps = ();
@@ -165,7 +174,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        $curdir =~ s%^$tmp/%%;
                        find sub {
                                return unless -f;
-                               $has_module = 1 if /\.py$/;
+                               if (/\.py$/) {
+                                       $has_module = 1;
+                                       doit(("rm","-f",$_."c",$_."o"));
+                               }
                        }, "$tmp/$curdir" ;
                        if ($has_module) {
                                if ($dh{V_FLAG_SET}) {
@@ -177,10 +189,28 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        }
                }
        }
+       if (@dirs_so) {
+               foreach my $curdir (@dirs_so) {
+                       my $has_module = 0;
+                       $curdir =~ s%^$tmp/%%;
+                       find sub {
+                               return unless -f;
+                               $has_module = 1 if /\.so$/;
+                       }, "$tmp/$curdir" ;
+                       if ($has_module) {
+                               if ($dh{V_FLAG_SET}) {
+                                       $verdeps{$usepython} |= SO_MODULE_NONSTANDARD;
+                               }
+                               else {
+                                       $deps |= SO_MODULE;
+                               }
+                       }
+               }
+       }
 
        # Dependencies on current python
        $dep_on_python = 1 if $deps;
-       $strong_dep = 1 if($deps & PY_MODULE);
+       $strong_dep = 1 if($deps & (PY_MODULE|SO_MODULE));
 
        if ($dep_on_python) {
                addsubstvar($package, "python:Depends", $python, ">= $python_version");
@@ -200,7 +230,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (grep -d,"$tmp$pydir") {
                                find sub {
                                        return unless -f;
-                                       $verdeps{$pyver} |= PY_MODULE if /\.py$/;
+                                       if (/\.py$/) {
+                                               $verdeps{$pyver} |= PY_MODULE;
+                                               doit(("rm","-f",$_."c",$_."o"));
+                                       }
+                                       $verdeps{$pyver} |= SO_MODULE if /\.so$/;
                                }, "$tmp$pydir";
                        }
                }