[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#370833: New dh_python proposal



retitle 370833 Please update dh_python for the new Python policy
severity 370833 normal
thanks

On Sat, 10 Jun 2006, Raphael Hertzog wrote:
> > Please reconsider. If you don't integrate that version now, we'll most
> > probably do the switch to python2.4 in the next days and we'll replace
> > dh_python calls by dh_python2 calls (integrated for example in the python
> > package) or we'll remove call to dh_python in favor of dh_pycentral (existing
> > and in python-central) / dh_pythonsupport (not existing but quick to
> > create).
> 
> After discussing with doko and vorlon, I decided to change dh_python to
> respect your wish (it's understandable).
> 
> Please find a new dh_python attached. This one supports neither
> python-central nor python-support. It does however all the substvars
> handling required by the new Python policy and is still compatible with
> the old policy.
> 
> Please integrate that one.

You haven't commented that last version yet (despite my /queries). I
believe it's ok to be integrated as we have a good agreement on the new
Python policy.

Concerning the implementation of byte-compiling, it's done outside of
debhelper with dh_pycentral or dh_pysupport. The RM are ok with the
existence of two competing implementations.

The migration to python2.4 is started with the new python-defaults in
experimental now (see http://lists.debian.org/debian-python/2006/06/msg00088.html)
and packagers are supposed to prepare new python modules respecting the
new policy so that they can be uploaded at the same time than
python-defaults in unstable (or even before since the new policy allows
support of several python versions in the same package). So the dh_python
support in debhelper is really critical now.

I would love to have this fixed by today's dinstall. That's why I
prepared the attached NMU, please just send an OK and I'll upload it (of
course, feel free to do it yourself in a maintainer upload).

Without any answer from you, I might upload it right before dinstall
(depending on the opinion of other involved people).

I don't want to impose you something that you're not happy with, and
I'll gladly work further with you to fix any remaining issue in upcoming
uploads but the time is getting a criticall issue. This version has been
enough tested and works well, so we should really start the migration with
it.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/
diff -ur debhelper-5.0.37/debian/changelog debhelper-5.0.37.1/debian/changelog
--- debhelper-5.0.37/debian/changelog	2006-06-12 03:33:28.000000000 +0200
+++ debhelper-5.0.37.1/debian/changelog	2006-06-12 09:03:55.000000000 +0200
@@ -1,3 +1,10 @@
+debhelper (5.0.37.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Integrate the new dh_python implementing the new Python policy. Closes: #370833
+
+ -- Raphael Hertzog <hertzog@debian.org>  Mon, 12 Jun 2006 08:58:22 +0200
+
 debhelper (5.0.37) unstable; urgency=low
 
   * dh_installmodules: depmod -a is no longer run during boot, so if a module
diff -ur debhelper-5.0.37/dh_python debhelper-5.0.37.1/dh_python
--- debhelper-5.0.37/dh_python	2006-04-24 22:09:12.000000000 +0200
+++ debhelper-5.0.37.1/dh_python	2006-06-12 09:04:07.000000000 +0200
@@ -21,7 +21,34 @@
 will also add a postinst and a prerm script if required.
 
 The program will look at python scripts and modules in your package, and
-will use this information to generate a dependency on python, with the
+will use this information to generate adequate dependencies. There is two
+scenarios: if the package uses the XS-Python-Version field then
+the new policy will be applied, otherwise the old policy will be used.
+
+=head2 New policy
+
+The XS-Python-Version field (on the source package) defines which Python
+versions are supported by the package. It can be "all", "current",
+"current, >= X.Y", a single version ("2.3") or a list of versions with
+optional comparison operators (ex: "2.3, 2.4" or ">= 2.2, << 2.5" or 
+">= 2.4").
+
+The binary packages should have a "XB-Python-Version: ${python:Versions}"
+field and dh_python will generate the right substvar for that. The
+resulting value can be "all" for public modules which work with all python
+versions, "current" for private modules which are always byte-compiled
+with the current python version or a list of of all versions for which the
+extensions have been compiled (ex: "2.3, 2.4"). The dependencies are
+adjusted accordingly as well.
+
+Packages with public extensions should also have a "Provides:
+${python:Provides}" field. The corresponding substvar will indicate
+"pythonX.Y-foo, pythonX.Z-foo" according to all the extensions
+effectively available in the package.
+
+=head2 Old policy
+
+It looks at scripts and modules in your package and adds a dependency on python, with the
 current major version, or on pythonX.Y if your scripts or modules need a
 specific python version. The dependency will be substituted into your
 package's control file wherever you place the token "${python:Depends}".
@@ -32,6 +59,8 @@
 
 If you use this program, your package should build-depend on python.
 
+Note: in the old policy, /usr/lib/site-python is also scanned for modules.
+
 =head1 OPTIONS
 
 =over 4
@@ -40,11 +69,10 @@
 
 If your package installs python modules in non-standard directories, you
 can make dh_python check those directories by passing their names on the
-command line. By default, it will check /usr/lib/site-python,
-/usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
+command line. By default, it will check /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
+Note: only /usr/lib/python?.?/site-packages and the
 extra names on the command line are searched for binary (.so) modules.
 
 =item B<-V> I<version>
@@ -53,6 +81,9 @@
 pythonX.Y version, you can use this option to specify the desired version,
 such as 2.3. Do not use if you ship modules in /usr/lib/site-python.
 
+With the new policy, this option is mostly deprecated. Use the
+XS-Python-Field to indicate that you're using a specific python version.
+
 =item B<-n>, B<--noscripts>
 
 Do not modify postinst/postrm scripts.
@@ -85,10 +116,10 @@
 }
 
 # The next python version
-my $python_nextversion = $python_version + 0.1;
+my $python_nextversion = next_minor_version($python_version);
 my $python_nextmajor = $python_major + 1;
 
-my @python_allversions = ('1.5','2.1','2.2','2.3','2.4');
+my @python_allversions = ('1.5','2.1','2.2','2.3','2.4','2.5');
 foreach (@python_allversions) {
 	s/^/python/;
 }
@@ -109,6 +140,17 @@
 	s#^/##;
 }
 
+# Check if we have an XS-Python-Version and extract it from the control
+# file, also check if we use python-central
+my $python_header = "";
+{
+	local $/ = ""; # Grab until empty line
+	open(CONTROL, "debian/control"); # Can't fail, dh_testdir has already been called
+	my $source = <CONTROL>;
+	$python_header = $1 if ($source =~ m/^XS-Python-Version: \s*(.*)$/m);
+	chomp($python_header);
+}
+
 # dependency types
 use constant PROGRAM   => 1;
 use constant PY_MODULE => 2;
@@ -119,30 +161,37 @@
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $tmp = tmpdir($package);
 
-	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 @dirs = ("usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV );
+	my @dirs_so = (@ARGV);
 
 	my $dep_on_python = 0;
 	my $strong_dep = 0;
-	my $look_for_pythonXY = 1;
+
+	# Fail early if the package use usr/lib/site-python
+	if (-d "$tmp/usr/lib/site-python") {
+		if ($python_header) {
+			# Error only on new policy
+			error("The package $package puts files in /usr/lib/site-python: forbidden by policy");
+		} else {
+			# Old policy allowed that directory, so scan it
+			push @dirs, "usr/lib/site-python";
+			push @dirs_so, "usr/lib/site-python";
+		}
+	}
 
 	# First, the case of python-foo and pythonX.Y-foo
 	if ($package =~ /^python-/) {
 		$dep_on_python = 1;
 		$strong_dep = 1;
+		# This adds a dependency to python<current>-foo in python-foo
+		# This is old policy but is done only if pythonX.Y-foo exists
+		# it does no harm and assure backwards compatibility
 		my $pack = $package;
 		$pack =~ s/^python/python$python_version/;
 		if (grep { "$_" eq "$pack" } getpackages()) {
 			addsubstvar($package, "python:Depends", $pack);
 		}
 	}
-	if ($package !~ /^python[0-9].[0-9]-/) {
-		push @dirs, "usr/lib/$usepython/site-packages";
-		push @dirs_so, "usr/lib/$usepython/site-packages";
-		$look_for_pythonXY = 0;
-	}
 
 	@dirs = grep -d, map "$tmp/$_", @dirs;
 	@dirs_so = grep -d, map "$tmp/$_", @dirs_so;
@@ -202,8 +251,7 @@
 			if ($has_module) {
 				if ($dh{V_FLAG_SET}) {
 					$verdeps{$usepython} |= SO_MODULE_NONSTANDARD;
-				}
-				else {
+				} else {
 					$deps |= SO_MODULE;
 				}
 			}
@@ -212,9 +260,10 @@
 
 	# Dependencies on current python
 	$dep_on_python = 1 if $deps;
-	$strong_dep = 1 if($deps & (PY_MODULE|SO_MODULE));
+	$strong_dep = 1 if ($deps & (PY_MODULE|SO_MODULE));
 
-	if ($dep_on_python) {
+	if ($dep_on_python and not $python_header) {
+		# Generate dependencies following old policy
 		addsubstvar($package, "python:Depends", $python, ">= $python_version");
 		if ($strong_dep) {
 			addsubstvar($package, "python:Depends", $python, "<< $python_nextversion");
@@ -223,35 +272,54 @@
 		}
 	}
 
+	# At this point we have scanned everything for executables scripts
+	# and directories for private modules. 
+
 	my $need_prerm = 0;
 
 	# Look for specific pythonX.Y modules
+	my %pyversions_found;
 	foreach my $pyver (@python_allversions) {
 		my $pydir="/usr/lib/$pyver/site-packages";
-		if ($look_for_pythonXY) {
-			if (grep -d,"$tmp$pydir") {
-				find sub {
-					return unless -f;
-					if (/\.py$/) {
-						$verdeps{$pyver} |= PY_MODULE;
-						doit(("rm","-f",$_."c",$_."o"));
-					}
-					$verdeps{$pyver} |= SO_MODULE if /\.so$/;
-				}, "$tmp$pydir";
-			}
+		if (-d "$tmp$pydir") {
+			find sub {
+				return unless -f;
+				if (/\.py$/) {
+					$verdeps{$pyver} |= PY_MODULE;
+					doit(("rm","-f",$_."c",$_."o"));
+				}
+				$verdeps{$pyver} |= SO_MODULE if /\.so$/;
+			}, "$tmp$pydir";
 		}
 	
+		if ($verdeps{$pyver} & (PY_MODULE|SO_MODULE)) {
+		    # Remember that files specific to this version have
+		    # been found
+		    $pyver =~ /^python([\d\.]+)/ and $pyversions_found{$1} = 1;
+		}
+
+		# Stop here when using new policy
+		next if $python_header;
+
 		# Go for the dependencies
 		addsubstvar($package, "python:Depends", $pyver) if $verdeps{$pyver};
 
 		# And now, the postinst and prerm stuff
+		# It takes care of byte-compiling modules
 		if ($pyver eq "$usepython") {
+			# Current version of python, also byte-compile the
+			# private directories (stored in $dirlist)
 			if ($verdeps{$pyver} & PY_MODULE) {
 				$pydir = $pydir.$dirlist;
 			} else {
+				# Only private directories
 				$pydir = $dirlist;
 			}
 			$verdeps{$pyver} |= PY_MODULE if($deps & PY_MODULE);
+		} else {
+			# Non-current python versions: we only have to
+			# byte-compile stuff in /usr/lib/python2.X
+			# Leave $pydir as is
 		}
 		if ($verdeps{$pyver} & (PY_MODULE|PY_MODULE_NONSTANDARD) && ! $dh{NOSCRIPTS}) {
 			autoscript($package,"postinst","postinst-python","s%#PYVER#%$pyver%;s%#DIRLIST#%$pydir%");
@@ -261,6 +329,186 @@
 	if ($need_prerm && ! $dh{NOSCRIPTS}) {
 		autoscript($package,"prerm","prerm-python","s%#PACKAGE#%$package%");
 	}
+
+	# Look for python2.X modules from the python package itself
+	foreach my $pyver (@python_allversions) {
+		my $pydir="/usr/lib/$pyver";
+		if (-d "$tmp$pydir") {
+			find sub {
+				return unless -f;
+				return if $File::Find::name =~ m|^$tmp$pydir/site-packages/|;
+				if (/\.py$/) {
+					$verdeps{$pyver} |= PY_MODULE;
+					doit(("rm","-f",$_."c",$_."o"));
+				}
+				$verdeps{$pyver} |= SO_MODULE if /\.so$/;
+			}, "$tmp$pydir";
+		}
+	
+		if ($verdeps{$pyver} & (PY_MODULE|SO_MODULE)) {
+		    # Remember that files specific to this version have
+		    # been found
+		    $pyver =~ /^python([\d\.]+)/ and $pyversions_found{$1} = 1;
+		}
+	}
+
+	if ($python_header) {
+		# New policy: generate the depends to accept all python
+		# versions that this package effectively provides
+		my $min_version = "";
+		my $stop_version = "";
+		my $versions_field = "";
+		
+		# Reset again, analysis using new policy follows
+		$dep_on_python = 0;
+
+		# Extracting min version from XS-Python-version
+		if ($python_header =~ /^current(?:,\s*>=\s*([\d\.]+))?/) {
+			if (defined $1) {
+				$min_version = $1;
+			}
+			$versions_field = "current";
+		} elsif ($python_header =~ />=\s*([\d\.]+)/) {
+			$min_version = $1;
+		}
+		if ($python_header =~ /<<\s*([\d\.]+)/) {
+			$stop_version = $1;
+		}
+
+		# Private extensions, must be rebuilt for each python version
+		if ($deps & SO_MODULE) {
+			$dep_on_python++;
+			$stop_version = next_minor_version($python_version);
+			# Packages using a private extension can only
+			# support one version and they indicate which one
+			# in XS-Python-Version
+			if ($versions_field eq "current") {
+				$versions_field = $python_version;
+			} else {
+				$versions_field = $python_header;
+			}
+		} 
+
+		# Private modules 
+		if ($deps & PY_MODULE) {
+			# Package with private module can only support one version at a time
+			# (even if the modules can be automatically byte-compiled for any new
+			# python version).
+			unless ($versions_field) {
+				# If XS-Python-Version indicated "current" we would already have a value,
+				# since we have not, XS-Python-Version must contain a hardcoded version.
+				if ($python_header =~ /^[\d\.]+$/) {
+					$versions_field = $python_header;
+				} else {
+					warning("The package contains private modules. It should indicate 'current'\n".
+					    "or a harcoded python version (ex: '2.4') in the XS-Python-Version field.\n")
+				}
+			}
+			$versions_field = "current" unless $versions_field;
+		}
+
+		# Python scripts
+		if ($deps & PROGRAM) {
+			$dep_on_python++;
+		}
+			
+		# Public extensions
+		# XXX: if we have *.py files left in /usr/lib/python2.X/site-packages
+		# they are no more byte-compiled... but that shouldn't happen if the
+		# package really conforms to the policy
+		if (scalar keys %pyversions_found) {
+			# Extensions will always trigger this (as well as public
+			# modules not handled by python-support/python-central)
+			$dep_on_python++;
+			$min_version = min(keys %pyversions_found);
+			unless ($stop_version) {
+			    my $max_version = max(keys %pyversions_found);
+			    $stop_version = next_minor_version($max_version);
+			}
+			# Generate the Python-Version field
+			foreach (keys %pyversions_found) {
+				addsubstvar($package, "python:Versions", $_);
+			}
+			# Generate provides for the python2.X-foo packages that we emulate
+			if ($package =~ /^python-/) {
+				foreach (keys %pyversions_found) {
+					my $virtual = $package;
+					$virtual =~ s/^python-/$python$_-/;
+					addsubstvar($package, "python:Provides", $virtual);
+				}
+			}
+		} else {
+			# Still try to describe the versions that the package support
+			$versions_field = "all" unless $versions_field;
+			addsubstvar($package, "python:Versions", $versions_field);
+		}
+		
+		# Private extensions compiled with non-current python
+		# or scripts using non-current python
+		foreach my $pyver (keys %verdeps) {
+			if ($verdeps{$pyver} & (SO_MODULE_NONSTANDARD|PROGRAM)) {
+				addsubstvar($package, "python:Depends", $pyver);
+				# Heuristic: if we have pythonX.Y program and if we have precisely only that
+				# $pyversions_found, we don't need to depend on a specific interval of python
+				my @found = keys %pyversions_found;
+				if (($verdeps{$pyver} & PROGRAM) &&
+				    (scalar @found == 1) &&
+				    ("python$found[0]" eq $pyver)
+				   ) {
+					$dep_on_python--; # Cancel the dep_on_python due to shared extensions
+					$min_version = "";
+					$stop_version = "";
+				}
+			}
+		}
+
+		if ($dep_on_python) {
+			# At least a script has been detected
+			addsubstvar($package, "python:Depends", $python, ">= $min_version") if $min_version;
+			# If a stronger dependency is needed
+			addsubstvar($package, "python:Depends", $python, "<< $stop_version") if $stop_version;
+			# Let's depend on python anyway
+			addsubstvar($package, "python:Depends", $python) unless ($min_version or $stop_version);
+		}
+	}
+}
+
+sub next_minor_version {
+    my $version = shift;
+    # Handles 2.10 -> 2.11 gracefully
+    my @items = split(/\./, $version);
+    $items[1] += 1;
+    $version = join(".", @items);
+    return $version;
+}
+
+sub compare_version {
+    my ($a, $b) = @_;
+    my @A = split(/\./, $a);
+    my @B = split(/\./, $b);
+    my $diff = 0;
+    for (my $i = 0; $i <= $#A; $i++) {
+	$diff = $A[$i] - $B[$i];
+	return $diff if $diff; 
+    }
+    # They are the same
+    return 0;
+}
+
+sub max {
+    my $max = shift;
+    foreach (@_) {
+	$max = $_ if (compare_version($_, $max) > 0);
+    }
+    return $max;
+}
+
+sub min {
+    my $min = shift;
+    foreach (@_) {
+	$min = $_ if (compare_version($_, $min) < 0);
+    }
+    return $min;
 }
 
 =head1 SEE ALSO
@@ -269,9 +517,10 @@
 
 This program is a part of debhelper.
 
-=head1 AUTHOR
+=head1 AUTHORS
 
 Josselin Mouette <joss@debian.org>
+Raphael Hertzog <hertzog@debian.org>
 
 most ideas stolen from Brendan O'Dea <bod@debian.org>
 
diff -ur debhelper-5.0.37/man/po4a/po/debhelper.pot debhelper-5.0.37.1/man/po4a/po/debhelper.pot
--- debhelper-5.0.37/man/po4a/po/debhelper.pot	2006-06-12 03:43:54.000000000 +0200
+++ debhelper-5.0.37.1/man/po4a/po/debhelper.pot	2006-06-12 09:05:08.000000000 +0200
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2006-06-09 17:10-0400\n"
+"POT-Creation-Date: 2006-06-12  9:05+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -54,7 +54,7 @@
 msgstr ""
 
 # type: =head1
-#: dh_installpam:24 dh_installemacsen:34 dh_installinfo:36 dh_strip:35 dh_installppp:26 dh_compress:38 dh_md5sums:28 dh_installexamples:29 dh_installcron:24 dh_installinit:33 dh_usrlocal:38 dh_gconf:34 dh_installmodules:34 dh_installmenu:33 dh_installlogrotate:22 dh_clean:25 dh_testversion:34 dh_testdir:23 dh_shlibdeps:26 dh_scrollkeeper:31 dh_installdirs:32 dh_link:48 dh_installdebconf:49 dh_installmime:30 dh_installwm:30 dh_builddeb:21 dh_gencontrol:26 dh_install:43 dh_makeshlibs:24 dh_perl:28 dh_fixperms:31 dh_installman:53 dh_movefiles:32 dh_installchangelogs:40 dh_python:35 dh_installdocs:51 dh_installcatalogs:42 dh_installmanpages:40
+#: dh_installpam:24 dh_installemacsen:34 dh_installinfo:36 dh_strip:35 dh_installppp:26 dh_compress:38 dh_md5sums:28 dh_installexamples:29 dh_installcron:24 dh_installinit:33 dh_usrlocal:38 dh_gconf:34 dh_installmodules:34 dh_installmenu:33 dh_installlogrotate:22 dh_clean:25 dh_testversion:34 dh_testdir:23 dh_shlibdeps:26 dh_scrollkeeper:31 dh_installdirs:32 dh_link:48 dh_installdebconf:49 dh_installmime:30 dh_installwm:30 dh_builddeb:21 dh_gencontrol:26 dh_install:43 dh_makeshlibs:24 dh_perl:28 dh_fixperms:31 dh_installman:53 dh_movefiles:32 dh_installchangelogs:40 dh_python:64 dh_installdocs:51 dh_installcatalogs:42 dh_installmanpages:40
 msgid "OPTIONS"
 msgstr ""
 
@@ -72,27 +72,27 @@
 msgstr ""
 
 # type: =head1
-#: dh_installpam:52 dh_installemacsen:108 dh_installinfo:122 dh_strip:215 dh_installppp:56 dh_compress:189 dh_md5sums:86 dh_installexamples:102 dh_installcron:61 dh_installinit:197 dh_usrlocal:113 dh_gconf:90 dh_installmodules:114 dh_installmenu:79 dh_installlogrotate:50 debhelper.pod:437 dh_clean:106 dh_undocumented:28 dh_testversion:74 dh_testdir:43 dh_shlibdeps:150 dh_scrollkeeper:75 dh_installdirs:87 dh_link:212 dh_installdebconf:117 dh_installmime:84 dh_installwm:94 dh_installdeb:93 dh_builddeb:78 dh_gencontrol:73 dh_install:251 dh_makeshlibs:200 dh_perl:140 dh_fixperms:107 dh_listpackages:28 dh_installman:229 dh_testroot:26 dh_movefiles:162 dh_desktop:43 dh_suidregister:117 dh_installchangelogs:125 dh_python:266 dh_installdocs:233 dh_installcatalogs:109 dh_installmanpages:197 dh_installxfonts:85 dh_installlogcheck:51
+#: dh_installpam:52 dh_installemacsen:108 dh_installinfo:122 dh_strip:215 dh_installppp:56 dh_compress:189 dh_md5sums:86 dh_installexamples:102 dh_installcron:61 dh_installinit:197 dh_usrlocal:113 dh_gconf:90 dh_installmodules:119 dh_installmenu:79 dh_installlogrotate:50 debhelper.pod:437 dh_clean:106 dh_undocumented:28 dh_testversion:74 dh_testdir:43 dh_shlibdeps:150 dh_scrollkeeper:75 dh_installdirs:87 dh_link:212 dh_installdebconf:117 dh_installmime:84 dh_installwm:94 dh_installdeb:93 dh_builddeb:78 dh_gencontrol:73 dh_install:251 dh_makeshlibs:200 dh_perl:140 dh_fixperms:107 dh_listpackages:28 dh_installman:229 dh_testroot:26 dh_movefiles:162 dh_desktop:43 dh_suidregister:117 dh_installchangelogs:125 dh_python:514 dh_installdocs:233 dh_installcatalogs:109 dh_installmanpages:197 dh_installxfonts:85 dh_installlogcheck:51
 msgid "SEE ALSO"
 msgstr ""
 
 # type: textblock
-#: dh_installpam:54 dh_installemacsen:110 dh_installinfo:124 dh_strip:217 dh_installppp:58 dh_compress:191 dh_md5sums:88 dh_installexamples:104 dh_installcron:63 dh_installinit:199 dh_usrlocal:115 dh_gconf:92 dh_installmodules:116 dh_installlogrotate:52 dh_clean:108 dh_undocumented:30 dh_testversion:76 dh_testdir:45 dh_installdirs:89 dh_link:214 dh_installdebconf:119 dh_installmime:86 dh_installwm:96 dh_installdeb:95 dh_builddeb:80 dh_gencontrol:75 dh_install:253 dh_makeshlibs:202 dh_perl:142 dh_fixperms:109 dh_listpackages:30 dh_installman:231 dh_testroot:28 dh_movefiles:164 dh_suidregister:119 dh_installchangelogs:127 dh_python:268 dh_installdocs:235 dh_installcatalogs:111 dh_installmanpages:199 dh_installxfonts:87 dh_installlogcheck:53
+#: dh_installpam:54 dh_installemacsen:110 dh_installinfo:124 dh_strip:217 dh_installppp:58 dh_compress:191 dh_md5sums:88 dh_installexamples:104 dh_installcron:63 dh_installinit:199 dh_usrlocal:115 dh_gconf:92 dh_installmodules:121 dh_installlogrotate:52 dh_clean:108 dh_undocumented:30 dh_testversion:76 dh_testdir:45 dh_installdirs:89 dh_link:214 dh_installdebconf:119 dh_installmime:86 dh_installwm:96 dh_installdeb:95 dh_builddeb:80 dh_gencontrol:75 dh_install:253 dh_makeshlibs:202 dh_perl:142 dh_fixperms:109 dh_listpackages:30 dh_installman:231 dh_testroot:28 dh_movefiles:164 dh_suidregister:119 dh_installchangelogs:127 dh_python:516 dh_installdocs:235 dh_installcatalogs:111 dh_installmanpages:199 dh_installxfonts:87 dh_installlogcheck:53
 msgid "L<debhelper(7)>"
 msgstr ""
 
 # type: textblock
-#: dh_installpam:56 dh_installemacsen:112 dh_installinfo:126 dh_strip:219 dh_installppp:60 dh_compress:193 dh_md5sums:90 dh_installexamples:106 dh_installcron:65 dh_installinit:201 dh_usrlocal:117 dh_gconf:94 dh_installmodules:118 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110 dh_undocumented:32 dh_testversion:78 dh_testdir:47 dh_shlibdeps:154 dh_scrollkeeper:79 dh_installdirs:91 dh_link:216 dh_installdebconf:121 dh_installmime:88 dh_installwm:98 dh_installdeb:97 dh_builddeb:82 dh_gencontrol:77 dh_install:255 dh_makeshlibs:204 dh_perl:144 dh_fixperms:111 dh_listpackages:32 dh_installman:233 dh_testroot:30 dh_movefiles:166 dh_desktop:47 dh_suidregister:121 dh_installchangelogs:129 dh_python:270 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
+#: dh_installpam:56 dh_installemacsen:112 dh_installinfo:126 dh_strip:219 dh_installppp:60 dh_compress:193 dh_md5sums:90 dh_installexamples:106 dh_installcron:65 dh_installinit:201 dh_usrlocal:117 dh_gconf:94 dh_installmodules:123 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110 dh_undocumented:32 dh_testversion:78 dh_testdir:47 dh_shlibdeps:154 dh_scrollkeeper:79 dh_installdirs:91 dh_link:216 dh_installdebconf:121 dh_installmime:88 dh_installwm:98 dh_installdeb:97 dh_builddeb:82 dh_gencontrol:77 dh_install:255 dh_makeshlibs:204 dh_perl:144 dh_fixperms:111 dh_listpackages:32 dh_installman:233 dh_testroot:30 dh_movefiles:166 dh_desktop:47 dh_suidregister:121 dh_installchangelogs:129 dh_python:518 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
 msgid "This program is a part of debhelper."
 msgstr ""
 
 # type: =head1
-#: dh_installpam:58 dh_installemacsen:114 dh_installinfo:128 dh_strip:221 dh_installppp:62 dh_compress:195 dh_md5sums:92 dh_installexamples:108 dh_installcron:67 dh_installinit:203 dh_usrlocal:119 dh_gconf:96 dh_installmodules:120 dh_installmenu:87 dh_installlogrotate:56 debhelper.pod:451 dh_clean:112 dh_undocumented:34 dh_testversion:80 dh_testdir:49 dh_shlibdeps:156 dh_scrollkeeper:81 dh_installdirs:93 dh_link:218 dh_installdebconf:123 dh_installmime:90 dh_installwm:100 dh_installdeb:99 dh_builddeb:84 dh_gencontrol:79 dh_install:257 dh_makeshlibs:206 dh_perl:146 dh_fixperms:113 dh_listpackages:34 dh_installman:235 dh_testroot:32 dh_movefiles:168 dh_desktop:49 dh_suidregister:123 dh_installchangelogs:131 dh_python:272 dh_installdocs:239 dh_installcatalogs:115 dh_installmanpages:203 dh_installxfonts:91 dh_installlogcheck:57
+#: dh_installpam:58 dh_installemacsen:114 dh_installinfo:128 dh_strip:221 dh_installppp:62 dh_compress:195 dh_md5sums:92 dh_installexamples:108 dh_installcron:67 dh_installinit:203 dh_usrlocal:119 dh_gconf:96 dh_installmodules:125 dh_installmenu:87 dh_installlogrotate:56 debhelper.pod:451 dh_clean:112 dh_undocumented:34 dh_testversion:80 dh_testdir:49 dh_shlibdeps:156 dh_scrollkeeper:81 dh_installdirs:93 dh_link:218 dh_installdebconf:123 dh_installmime:90 dh_installwm:100 dh_installdeb:99 dh_builddeb:84 dh_gencontrol:79 dh_install:257 dh_makeshlibs:206 dh_perl:146 dh_fixperms:113 dh_listpackages:34 dh_installman:235 dh_testroot:32 dh_movefiles:168 dh_desktop:49 dh_suidregister:123 dh_installchangelogs:131 dh_installdocs:239 dh_installcatalogs:115 dh_installmanpages:203 dh_installxfonts:91 dh_installlogcheck:57
 msgid "AUTHOR"
 msgstr ""
 
 # type: textblock
-#: dh_installpam:60 dh_installemacsen:116 dh_installinfo:130 dh_strip:223 dh_installppp:64 dh_compress:197 dh_md5sums:94 dh_installexamples:110 dh_installcron:69 dh_installinit:205 dh_installmodules:122 dh_installmenu:89 dh_installlogrotate:58 debhelper.pod:453 dh_clean:114 dh_undocumented:36 dh_testversion:82 dh_testdir:51 dh_shlibdeps:158 dh_installdirs:95 dh_link:220 dh_installdebconf:125 dh_installmime:92 dh_installwm:102 dh_installdeb:101 dh_builddeb:86 dh_gencontrol:81 dh_install:259 dh_makeshlibs:208 dh_fixperms:115 dh_listpackages:36 dh_installman:237 dh_testroot:34 dh_movefiles:170 dh_suidregister:125 dh_installchangelogs:133 dh_installdocs:241 dh_installmanpages:205 dh_installxfonts:93
+#: dh_installpam:60 dh_installemacsen:116 dh_installinfo:130 dh_strip:223 dh_installppp:64 dh_compress:197 dh_md5sums:94 dh_installexamples:110 dh_installcron:69 dh_installinit:205 dh_installmodules:127 dh_installmenu:89 dh_installlogrotate:58 debhelper.pod:453 dh_clean:114 dh_undocumented:36 dh_testversion:82 dh_testdir:51 dh_shlibdeps:158 dh_installdirs:95 dh_link:220 dh_installdebconf:125 dh_installmime:92 dh_installwm:102 dh_installdeb:101 dh_builddeb:86 dh_gencontrol:81 dh_install:259 dh_makeshlibs:208 dh_fixperms:115 dh_listpackages:36 dh_installman:237 dh_testroot:34 dh_movefiles:170 dh_suidregister:125 dh_installchangelogs:133 dh_installdocs:241 dh_installmanpages:205 dh_installxfonts:93
 msgid "Joey Hess <joeyh@debian.org>"
 msgstr ""
 
@@ -136,7 +136,7 @@
 msgstr ""
 
 # type: =item
-#: dh_installemacsen:38 dh_installinfo:45 dh_installinit:37 dh_usrlocal:42 dh_installmodules:38 dh_installmenu:37 dh_scrollkeeper:35 dh_installdebconf:53 dh_installmime:34 dh_installwm:40 dh_makeshlibs:58 dh_python:56 dh_installdocs:60 dh_installcatalogs:46
+#: dh_installemacsen:38 dh_installinfo:45 dh_installinit:37 dh_usrlocal:42 dh_installmodules:38 dh_installmenu:37 dh_scrollkeeper:35 dh_installdebconf:53 dh_installmime:34 dh_installwm:40 dh_makeshlibs:58 dh_python:87 dh_installdocs:60 dh_installcatalogs:46
 msgid "B<-n>, B<--noscripts>"
 msgstr ""
 
@@ -355,7 +355,7 @@
 msgstr ""
 
 # type: =head1
-#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:62
+#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:93
 msgid "CONFORMS TO"
 msgstr ""
 
@@ -925,7 +925,7 @@
 msgstr ""
 
 # type: textblock
-#: dh_installmodules:40 dh_installmenu:39 dh_installmime:36 dh_makeshlibs:60 dh_python:58
+#: dh_installmodules:40 dh_installmenu:39 dh_installmime:36 dh_makeshlibs:60 dh_python:89
 msgid "Do not modify postinst/postrm scripts."
 msgstr ""
 
@@ -3486,14 +3486,64 @@
 #: dh_python:23
 msgid ""
 "The program will look at python scripts and modules in your package, and "
-"will use this information to generate a dependency on python, with the "
-"current major version, or on pythonX.Y if your scripts or modules need a "
-"specific python version. The dependency will be substituted into your "
-"package's control file wherever you place the token \"${python:Depends}\"."
+"will use this information to generate adequate dependencies. There is two "
+"scenarios: if the package uses the XS-Python-Version field then the new "
+"policy will be applied, otherwise the old policy will be used."
+msgstr ""
+
+# type: =head2
+#: dh_python:28
+msgid "New policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:30
+msgid ""
+"The XS-Python-Version field (on the source package) defines which Python "
+"versions are supported by the package. It can be \"all\", \"current\", "
+"\"current, >= X.Y\", a single version (\"2.3\") or a list of versions with "
+"optional comparison operators (ex: \"2.3, 2.4\" or \">= 2.2, << 2.5\" or "
+"\">= 2.4\")."
+msgstr ""
+
+# type: textblock
+#: dh_python:36
+msgid ""
+"The binary packages should have a \"XB-Python-Version: ${python:Versions}\" "
+"field and dh_python will generate the right substvar for that. The resulting "
+"value can be \"all\" for public modules which work with all python versions, "
+"\"current\" for private modules which are always byte-compiled with the "
+"current python version or a list of of all versions for which the extensions "
+"have been compiled (ex: \"2.3, 2.4\"). The dependencies are adjusted "
+"accordingly as well."
+msgstr ""
+
+# type: textblock
+#: dh_python:44
+msgid ""
+"Packages with public extensions should also have a \"Provides: "
+"${python:Provides}\" field. The corresponding substvar will indicate "
+"\"pythonX.Y-foo, pythonX.Z-foo\" according to all the extensions effectively "
+"available in the package."
+msgstr ""
+
+# type: =head2
+#: dh_python:49
+msgid "Old policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:51
+msgid ""
+"It looks at scripts and modules in your package and adds a dependency on "
+"python, with the current major version, or on pythonX.Y if your scripts or "
+"modules need a specific python version. The dependency will be substituted "
+"into your package's control file wherever you place the token "
+"\"${python:Depends}\"."
 msgstr ""
 
 # type: textblock
-#: dh_python:29
+#: dh_python:56
 msgid ""
 "If some modules need to be byte-compiled at install time, appropriate "
 "postinst and prerm scripts will be generated. If already byte-compiled "
@@ -3501,39 +3551,44 @@
 msgstr ""
 
 # type: textblock
-#: dh_python:33
+#: dh_python:60
 msgid "If you use this program, your package should build-depend on python."
 msgstr ""
 
+# type: textblock
+#: dh_python:62
+msgid "Note: in the old policy, /usr/lib/site-python is also scanned for modules."
+msgstr ""
+
 # type: =item
-#: dh_python:39
+#: dh_python:68
 msgid "I<module dirs>"
 msgstr ""
 
 # type: textblock
-#: dh_python:41
+#: dh_python:70
 msgid ""
 "If your package installs python modules in non-standard directories, you can "
 "make dh_python check those directories by passing their names on the 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 "
+"line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, "
+"/usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE and "
 "/usr/lib/python?.?/site-packages."
 msgstr ""
 
 # type: textblock
-#: dh_python:47
+#: dh_python:75
 msgid ""
-"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."
+"Note: only /usr/lib/python?.?/site-packages and the extra names on the "
+"command line are searched for binary (.so) modules."
 msgstr ""
 
 # type: =item
-#: dh_python:50
+#: dh_python:78
 msgid "B<-V> I<version>"
 msgstr ""
 
 # type: textblock
-#: dh_python:52
+#: dh_python:80
 msgid ""
 "If the .py files your package ships are meant to be used by a specific "
 "pythonX.Y version, you can use this option to specify the desired version, "
@@ -3541,22 +3596,34 @@
 msgstr ""
 
 # type: textblock
-#: dh_python:64
+#: dh_python:84
+msgid ""
+"With the new policy, this option is mostly deprecated. Use the "
+"XS-Python-Field to indicate that you're using a specific python version."
+msgstr ""
+
+# type: textblock
+#: dh_python:95
 msgid "Debian policy, version 3.5.7"
 msgstr ""
 
 # type: textblock
-#: dh_python:66
+#: dh_python:97
 msgid "Python policy, version 0.3.7"
 msgstr ""
 
+# type: =head1
+#: dh_python:520
+msgid "AUTHORS"
+msgstr ""
+
 # type: textblock
-#: dh_python:274
-msgid "Josselin Mouette <joss@debian.org>"
+#: dh_python:522
+msgid "Josselin Mouette <joss@debian.org> Raphael Hertzog <hertzog@debian.org>"
 msgstr ""
 
 # type: textblock
-#: dh_python:276
+#: dh_python:525
 msgid "most ideas stolen from Brendan O'Dea <bod@debian.org>"
 msgstr ""
 
diff -ur debhelper-5.0.37/man/po4a/po/es.po debhelper-5.0.37.1/man/po4a/po/es.po
--- debhelper-5.0.37/man/po4a/po/es.po	2006-06-09 23:10:15.000000000 +0200
+++ debhelper-5.0.37.1/man/po4a/po/es.po	2006-06-12 09:05:11.000000000 +0200
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2006-06-09 17:10-0400\n"
+"POT-Creation-Date: 2006-06-12  9:05+0200\n"
 "PO-Revision-Date: 2005-09-18 00:11+0200\n"
 "Last-Translator: Rubén Porras Campo <debian-l10n-spanish@lists.debian.org>\n"
 "Language-Team: SPANISH <debian-l10n-spanish@lists.debian.org>\n"
@@ -101,7 +101,7 @@
 #: dh_installdirs:32 dh_link:48 dh_installdebconf:49 dh_installmime:30
 #: dh_installwm:30 dh_builddeb:21 dh_gencontrol:26 dh_install:43
 #: dh_makeshlibs:24 dh_perl:28 dh_fixperms:31 dh_installman:53 dh_movefiles:32
-#: dh_installchangelogs:40 dh_python:35 dh_installdocs:51
+#: dh_installchangelogs:40 dh_python:64 dh_installdocs:51
 #: dh_installcatalogs:42 dh_installmanpages:40
 msgid "OPTIONS"
 msgstr "OPCIONES"
@@ -127,14 +127,14 @@
 #: dh_installpam:52 dh_installemacsen:108 dh_installinfo:122 dh_strip:215
 #: dh_installppp:56 dh_compress:189 dh_md5sums:86 dh_installexamples:102
 #: dh_installcron:61 dh_installinit:197 dh_usrlocal:113 dh_gconf:90
-#: dh_installmodules:114 dh_installmenu:79 dh_installlogrotate:50
+#: dh_installmodules:119 dh_installmenu:79 dh_installlogrotate:50
 #: debhelper.pod:437 dh_clean:106 dh_undocumented:28 dh_testversion:74
 #: dh_testdir:43 dh_shlibdeps:150 dh_scrollkeeper:75 dh_installdirs:87
 #: dh_link:212 dh_installdebconf:117 dh_installmime:84 dh_installwm:94
 #: dh_installdeb:93 dh_builddeb:78 dh_gencontrol:73 dh_install:251
 #: dh_makeshlibs:200 dh_perl:140 dh_fixperms:107 dh_listpackages:28
 #: dh_installman:229 dh_testroot:26 dh_movefiles:162 dh_desktop:43
-#: dh_suidregister:117 dh_installchangelogs:125 dh_python:266
+#: dh_suidregister:117 dh_installchangelogs:125 dh_python:514
 #: dh_installdocs:233 dh_installcatalogs:109 dh_installmanpages:197
 #: dh_installxfonts:85 dh_installlogcheck:51
 msgid "SEE ALSO"
@@ -144,13 +144,13 @@
 #: dh_installpam:54 dh_installemacsen:110 dh_installinfo:124 dh_strip:217
 #: dh_installppp:58 dh_compress:191 dh_md5sums:88 dh_installexamples:104
 #: dh_installcron:63 dh_installinit:199 dh_usrlocal:115 dh_gconf:92
-#: dh_installmodules:116 dh_installlogrotate:52 dh_clean:108
+#: dh_installmodules:121 dh_installlogrotate:52 dh_clean:108
 #: dh_undocumented:30 dh_testversion:76 dh_testdir:45 dh_installdirs:89
 #: dh_link:214 dh_installdebconf:119 dh_installmime:86 dh_installwm:96
 #: dh_installdeb:95 dh_builddeb:80 dh_gencontrol:75 dh_install:253
 #: dh_makeshlibs:202 dh_perl:142 dh_fixperms:109 dh_listpackages:30
 #: dh_installman:231 dh_testroot:28 dh_movefiles:164 dh_suidregister:119
-#: dh_installchangelogs:127 dh_python:268 dh_installdocs:235
+#: dh_installchangelogs:127 dh_python:516 dh_installdocs:235
 #: dh_installcatalogs:111 dh_installmanpages:199 dh_installxfonts:87
 #: dh_installlogcheck:53
 msgid "L<debhelper(7)>"
@@ -160,14 +160,14 @@
 #: dh_installpam:56 dh_installemacsen:112 dh_installinfo:126 dh_strip:219
 #: dh_installppp:60 dh_compress:193 dh_md5sums:90 dh_installexamples:106
 #: dh_installcron:65 dh_installinit:201 dh_usrlocal:117 dh_gconf:94
-#: dh_installmodules:118 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110
+#: dh_installmodules:123 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110
 #: dh_undocumented:32 dh_testversion:78 dh_testdir:47 dh_shlibdeps:154
 #: dh_scrollkeeper:79 dh_installdirs:91 dh_link:216 dh_installdebconf:121
 #: dh_installmime:88 dh_installwm:98 dh_installdeb:97 dh_builddeb:82
 #: dh_gencontrol:77 dh_install:255 dh_makeshlibs:204 dh_perl:144
 #: dh_fixperms:111 dh_listpackages:32 dh_installman:233 dh_testroot:30
 #: dh_movefiles:166 dh_desktop:47 dh_suidregister:121 dh_installchangelogs:129
-#: dh_python:270 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
+#: dh_python:518 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
 msgid "This program is a part of debhelper."
 msgstr "Este programa es parte de debhelper."
 
@@ -175,23 +175,23 @@
 #: dh_installpam:58 dh_installemacsen:114 dh_installinfo:128 dh_strip:221
 #: dh_installppp:62 dh_compress:195 dh_md5sums:92 dh_installexamples:108
 #: dh_installcron:67 dh_installinit:203 dh_usrlocal:119 dh_gconf:96
-#: dh_installmodules:120 dh_installmenu:87 dh_installlogrotate:56
+#: dh_installmodules:125 dh_installmenu:87 dh_installlogrotate:56
 #: debhelper.pod:451 dh_clean:112 dh_undocumented:34 dh_testversion:80
 #: dh_testdir:49 dh_shlibdeps:156 dh_scrollkeeper:81 dh_installdirs:93
 #: dh_link:218 dh_installdebconf:123 dh_installmime:90 dh_installwm:100
 #: dh_installdeb:99 dh_builddeb:84 dh_gencontrol:79 dh_install:257
 #: dh_makeshlibs:206 dh_perl:146 dh_fixperms:113 dh_listpackages:34
 #: dh_installman:235 dh_testroot:32 dh_movefiles:168 dh_desktop:49
-#: dh_suidregister:123 dh_installchangelogs:131 dh_python:272
-#: dh_installdocs:239 dh_installcatalogs:115 dh_installmanpages:203
-#: dh_installxfonts:91 dh_installlogcheck:57
+#: dh_suidregister:123 dh_installchangelogs:131 dh_installdocs:239
+#: dh_installcatalogs:115 dh_installmanpages:203 dh_installxfonts:91
+#: dh_installlogcheck:57
 msgid "AUTHOR"
 msgstr "AUTOR"
 
 # type: textblock
 #: dh_installpam:60 dh_installemacsen:116 dh_installinfo:130 dh_strip:223
 #: dh_installppp:64 dh_compress:197 dh_md5sums:94 dh_installexamples:110
-#: dh_installcron:69 dh_installinit:205 dh_installmodules:122
+#: dh_installcron:69 dh_installinit:205 dh_installmodules:127
 #: dh_installmenu:89 dh_installlogrotate:58 debhelper.pod:453 dh_clean:114
 #: dh_undocumented:36 dh_testversion:82 dh_testdir:51 dh_shlibdeps:158
 #: dh_installdirs:95 dh_link:220 dh_installdebconf:125 dh_installmime:92
@@ -260,7 +260,7 @@
 #: dh_installemacsen:38 dh_installinfo:45 dh_installinit:37 dh_usrlocal:42
 #: dh_installmodules:38 dh_installmenu:37 dh_scrollkeeper:35
 #: dh_installdebconf:53 dh_installmime:34 dh_installwm:40 dh_makeshlibs:58
-#: dh_python:56 dh_installdocs:60 dh_installcatalogs:46
+#: dh_python:87 dh_installdocs:60 dh_installcatalogs:46
 msgid "B<-n>, B<--noscripts>"
 msgstr "B<-n>, B<--noscripts>"
 
@@ -555,7 +555,7 @@
 "eliminará nada, conforme a las normas de Debian."
 
 # type: =head1
-#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:62
+#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:93
 msgid "CONFORMS TO"
 msgstr "CONFORME A"
 
@@ -1286,7 +1286,7 @@
 
 # type: textblock
 #: dh_installmodules:40 dh_installmenu:39 dh_installmime:36 dh_makeshlibs:60
-#: dh_python:58
+#: dh_python:89
 msgid "Do not modify postinst/postrm scripts."
 msgstr "No modifica los scripts postinst/postrm."
 
@@ -4661,12 +4661,68 @@
 
 # type: textblock
 #: dh_python:23
+#, fuzzy
 msgid ""
 "The program will look at python scripts and modules in your package, and "
-"will use this information to generate a dependency on python, with the "
-"current major version, or on pythonX.Y if your scripts or modules need a "
-"specific python version. The dependency will be substituted into your "
-"package's control file wherever you place the token \"${python:Depends}\"."
+"will use this information to generate adequate dependencies. There is two "
+"scenarios: if the package uses the XS-Python-Version field then the new "
+"policy will be applied, otherwise the old policy will be used."
+msgstr ""
+"El programa buscará scripts y módulos perl en su paquete, y usará esta "
+"información para generar una dependencia en perl o perlapi. La dependencia "
+"será substituida en el fichero de control de su paquete dondequiera que "
+"usted ubique la señal \"${perl:Depends}\"."
+
+# type: =head2
+#: dh_python:28
+msgid "New policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:30
+msgid ""
+"The XS-Python-Version field (on the source package) defines which Python "
+"versions are supported by the package. It can be \"all\", \"current\", "
+"\"current, >= X.Y\", a single version (\"2.3\") or a list of versions with "
+"optional comparison operators (ex: \"2.3, 2.4\" or \">= 2.2, << 2.5\" or "
+"\">= 2.4\")."
+msgstr ""
+
+# type: textblock
+#: dh_python:36
+msgid ""
+"The binary packages should have a \"XB-Python-Version: ${python:Versions}\" "
+"field and dh_python will generate the right substvar for that. The resulting "
+"value can be \"all\" for public modules which work with all python versions, "
+"\"current\" for private modules which are always byte-compiled with the "
+"current python version or a list of of all versions for which the extensions "
+"have been compiled (ex: \"2.3, 2.4\"). The dependencies are adjusted "
+"accordingly as well."
+msgstr ""
+
+# type: textblock
+#: dh_python:44
+msgid ""
+"Packages with public extensions should also have a \"Provides: ${python:"
+"Provides}\" field. The corresponding substvar will indicate \"pythonX.Y-foo, "
+"pythonX.Z-foo\" according to all the extensions effectively available in the "
+"package."
+msgstr ""
+
+# type: =head2
+#: dh_python:49
+msgid "Old policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:51
+#, fuzzy
+msgid ""
+"It looks at scripts and modules in your package and adds a dependency on "
+"python, with the current major version, or on pythonX.Y if your scripts or "
+"modules need a specific python version. The dependency will be substituted "
+"into your package's control file wherever you place the token \"${python:"
+"Depends}\"."
 msgstr ""
 "El programa buscará scripts y módulos python en su paquete, y usará esta "
 "información para generar una dependencia en python, con la versión mayor "
@@ -4676,7 +4732,7 @@
 "Depends}\"."
 
 # type: textblock
-#: dh_python:29
+#: dh_python:56
 msgid ""
 "If some modules need to be byte-compiled at install time, appropriate "
 "postinst and prerm scripts will be generated. If already byte-compiled "
@@ -4687,25 +4743,32 @@
 "ya compilados, se eliminarán."
 
 # type: textblock
-#: dh_python:33
+#: dh_python:60
 msgid "If you use this program, your package should build-depend on python."
 msgstr ""
 "Si usted usa este programa, su paquete debería incluir python en las "
 "dependencias de construcción."
 
+# type: textblock
+#: dh_python:62
+msgid ""
+"Note: in the old policy, /usr/lib/site-python is also scanned for modules."
+msgstr ""
+
 # type: =item
-#: dh_python:39
+#: dh_python:68
 msgid "I<module dirs>"
 msgstr "I<dirs módulos>"
 
 # type: textblock
-#: dh_python:41
+#: dh_python:70
+#, fuzzy
 msgid ""
 "If your package installs python modules in non-standard directories, you can "
 "make dh_python check those directories by passing their names on the 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."
+"line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/"
+"lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-"
+"packages."
 msgstr ""
 "Si su paquete instala módulos python en directorios que no sean estándares, "
 "usted puede hacer que dh_python verifique estos directorios especificando "
@@ -4714,22 +4777,23 @@
 "usr/share/games/$PACKAGE y /usr/lib/python?.?/site-packages."
 
 # type: textblock
-#: dh_python:47
+#: dh_python:75
+#, fuzzy
 msgid ""
-"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."
+"Note: only /usr/lib/python?.?/site-packages and the extra names on the "
+"command line are searched for binary (.so) modules."
 msgstr ""
 "Nota: sólo se buscan módulos binarios (.so) en /usr/lib/site-python, /usr/"
 "lib/python?.?/site-packages y en los directorios extra proporcionados "
 "mediante la línea de órdenes."
 
 # type: =item
-#: dh_python:50
+#: dh_python:78
 msgid "B<-V> I<version>"
 msgstr "B<-V> I<versión>"
 
 # type: textblock
-#: dh_python:52
+#: dh_python:80
 msgid ""
 "If the .py files your package ships are meant to be used by a specific "
 "pythonX.Y version, you can use this option to specify the desired version, "
@@ -4740,22 +4804,36 @@
 "deseada. No lo use si instala módulos en /usr/lib/site-python."
 
 # type: textblock
-#: dh_python:64
+#: dh_python:84
+msgid ""
+"With the new policy, this option is mostly deprecated. Use the XS-Python-"
+"Field to indicate that you're using a specific python version."
+msgstr ""
+
+# type: textblock
+#: dh_python:95
 msgid "Debian policy, version 3.5.7"
 msgstr "Normas de Debian, versión 3.5.7"
 
 # type: textblock
-#: dh_python:66
+#: dh_python:97
 msgid "Python policy, version 0.3.7"
 msgstr "Normas de Python, versión 0.3.7"
 
+# type: =head1
+#: dh_python:520
+#, fuzzy
+msgid "AUTHORS"
+msgstr "AUTOR"
+
 # type: textblock
-#: dh_python:274
-msgid "Josselin Mouette <joss@debian.org>"
+#: dh_python:522
+#, fuzzy
+msgid "Josselin Mouette <joss@debian.org> Raphael Hertzog <hertzog@debian.org>"
 msgstr "Josselin Mouette <joss@debian.org>"
 
 # type: textblock
-#: dh_python:276
+#: dh_python:525
 msgid "most ideas stolen from Brendan O'Dea <bod@debian.org>"
 msgstr "muchas de las ideas tomadas de Brendan O'Dea <bod@debian.org>"
 
diff -ur debhelper-5.0.37/man/po4a/po/fr.po debhelper-5.0.37.1/man/po4a/po/fr.po
--- debhelper-5.0.37/man/po4a/po/fr.po	2006-06-09 23:10:16.000000000 +0200
+++ debhelper-5.0.37.1/man/po4a/po/fr.po	2006-06-12 09:05:13.000000000 +0200
@@ -3,7 +3,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: debhelper manpages\n"
-"POT-Creation-Date: 2006-06-09 17:10-0400\n"
+"POT-Creation-Date: 2006-06-12  9:05+0200\n"
 "PO-Revision-Date: 2006-05-11 21:43+0200\n"
 "Last-Translator: Valery Perrin <valery.perrin.debian@free.fr>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -100,7 +100,7 @@
 #: dh_installdirs:32 dh_link:48 dh_installdebconf:49 dh_installmime:30
 #: dh_installwm:30 dh_builddeb:21 dh_gencontrol:26 dh_install:43
 #: dh_makeshlibs:24 dh_perl:28 dh_fixperms:31 dh_installman:53 dh_movefiles:32
-#: dh_installchangelogs:40 dh_python:35 dh_installdocs:51
+#: dh_installchangelogs:40 dh_python:64 dh_installdocs:51
 #: dh_installcatalogs:42 dh_installmanpages:40
 msgid "OPTIONS"
 msgstr "OPTIONS"
@@ -126,14 +126,14 @@
 #: dh_installpam:52 dh_installemacsen:108 dh_installinfo:122 dh_strip:215
 #: dh_installppp:56 dh_compress:189 dh_md5sums:86 dh_installexamples:102
 #: dh_installcron:61 dh_installinit:197 dh_usrlocal:113 dh_gconf:90
-#: dh_installmodules:114 dh_installmenu:79 dh_installlogrotate:50
+#: dh_installmodules:119 dh_installmenu:79 dh_installlogrotate:50
 #: debhelper.pod:437 dh_clean:106 dh_undocumented:28 dh_testversion:74
 #: dh_testdir:43 dh_shlibdeps:150 dh_scrollkeeper:75 dh_installdirs:87
 #: dh_link:212 dh_installdebconf:117 dh_installmime:84 dh_installwm:94
 #: dh_installdeb:93 dh_builddeb:78 dh_gencontrol:73 dh_install:251
 #: dh_makeshlibs:200 dh_perl:140 dh_fixperms:107 dh_listpackages:28
 #: dh_installman:229 dh_testroot:26 dh_movefiles:162 dh_desktop:43
-#: dh_suidregister:117 dh_installchangelogs:125 dh_python:266
+#: dh_suidregister:117 dh_installchangelogs:125 dh_python:514
 #: dh_installdocs:233 dh_installcatalogs:109 dh_installmanpages:197
 #: dh_installxfonts:85 dh_installlogcheck:51
 msgid "SEE ALSO"
@@ -143,13 +143,13 @@
 #: dh_installpam:54 dh_installemacsen:110 dh_installinfo:124 dh_strip:217
 #: dh_installppp:58 dh_compress:191 dh_md5sums:88 dh_installexamples:104
 #: dh_installcron:63 dh_installinit:199 dh_usrlocal:115 dh_gconf:92
-#: dh_installmodules:116 dh_installlogrotate:52 dh_clean:108
+#: dh_installmodules:121 dh_installlogrotate:52 dh_clean:108
 #: dh_undocumented:30 dh_testversion:76 dh_testdir:45 dh_installdirs:89
 #: dh_link:214 dh_installdebconf:119 dh_installmime:86 dh_installwm:96
 #: dh_installdeb:95 dh_builddeb:80 dh_gencontrol:75 dh_install:253
 #: dh_makeshlibs:202 dh_perl:142 dh_fixperms:109 dh_listpackages:30
 #: dh_installman:231 dh_testroot:28 dh_movefiles:164 dh_suidregister:119
-#: dh_installchangelogs:127 dh_python:268 dh_installdocs:235
+#: dh_installchangelogs:127 dh_python:516 dh_installdocs:235
 #: dh_installcatalogs:111 dh_installmanpages:199 dh_installxfonts:87
 #: dh_installlogcheck:53
 msgid "L<debhelper(7)>"
@@ -159,14 +159,14 @@
 #: dh_installpam:56 dh_installemacsen:112 dh_installinfo:126 dh_strip:219
 #: dh_installppp:60 dh_compress:193 dh_md5sums:90 dh_installexamples:106
 #: dh_installcron:65 dh_installinit:201 dh_usrlocal:117 dh_gconf:94
-#: dh_installmodules:118 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110
+#: dh_installmodules:123 dh_installmenu:85 dh_installlogrotate:54 dh_clean:110
 #: dh_undocumented:32 dh_testversion:78 dh_testdir:47 dh_shlibdeps:154
 #: dh_scrollkeeper:79 dh_installdirs:91 dh_link:216 dh_installdebconf:121
 #: dh_installmime:88 dh_installwm:98 dh_installdeb:97 dh_builddeb:82
 #: dh_gencontrol:77 dh_install:255 dh_makeshlibs:204 dh_perl:144
 #: dh_fixperms:111 dh_listpackages:32 dh_installman:233 dh_testroot:30
 #: dh_movefiles:166 dh_desktop:47 dh_suidregister:121 dh_installchangelogs:129
-#: dh_python:270 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
+#: dh_python:518 dh_installdocs:237 dh_installmanpages:201 dh_installxfonts:89
 msgid "This program is a part of debhelper."
 msgstr "Ce programme fait partie de debhelper."
 
@@ -174,23 +174,23 @@
 #: dh_installpam:58 dh_installemacsen:114 dh_installinfo:128 dh_strip:221
 #: dh_installppp:62 dh_compress:195 dh_md5sums:92 dh_installexamples:108
 #: dh_installcron:67 dh_installinit:203 dh_usrlocal:119 dh_gconf:96
-#: dh_installmodules:120 dh_installmenu:87 dh_installlogrotate:56
+#: dh_installmodules:125 dh_installmenu:87 dh_installlogrotate:56
 #: debhelper.pod:451 dh_clean:112 dh_undocumented:34 dh_testversion:80
 #: dh_testdir:49 dh_shlibdeps:156 dh_scrollkeeper:81 dh_installdirs:93
 #: dh_link:218 dh_installdebconf:123 dh_installmime:90 dh_installwm:100
 #: dh_installdeb:99 dh_builddeb:84 dh_gencontrol:79 dh_install:257
 #: dh_makeshlibs:206 dh_perl:146 dh_fixperms:113 dh_listpackages:34
 #: dh_installman:235 dh_testroot:32 dh_movefiles:168 dh_desktop:49
-#: dh_suidregister:123 dh_installchangelogs:131 dh_python:272
-#: dh_installdocs:239 dh_installcatalogs:115 dh_installmanpages:203
-#: dh_installxfonts:91 dh_installlogcheck:57
+#: dh_suidregister:123 dh_installchangelogs:131 dh_installdocs:239
+#: dh_installcatalogs:115 dh_installmanpages:203 dh_installxfonts:91
+#: dh_installlogcheck:57
 msgid "AUTHOR"
 msgstr "AUTEUR"
 
 # type: textblock
 #: dh_installpam:60 dh_installemacsen:116 dh_installinfo:130 dh_strip:223
 #: dh_installppp:64 dh_compress:197 dh_md5sums:94 dh_installexamples:110
-#: dh_installcron:69 dh_installinit:205 dh_installmodules:122
+#: dh_installcron:69 dh_installinit:205 dh_installmodules:127
 #: dh_installmenu:89 dh_installlogrotate:58 debhelper.pod:453 dh_clean:114
 #: dh_undocumented:36 dh_testversion:82 dh_testdir:51 dh_shlibdeps:158
 #: dh_installdirs:95 dh_link:220 dh_installdebconf:125 dh_installmime:92
@@ -261,7 +261,7 @@
 #: dh_installemacsen:38 dh_installinfo:45 dh_installinit:37 dh_usrlocal:42
 #: dh_installmodules:38 dh_installmenu:37 dh_scrollkeeper:35
 #: dh_installdebconf:53 dh_installmime:34 dh_installwm:40 dh_makeshlibs:58
-#: dh_python:56 dh_installdocs:60 dh_installcatalogs:46
+#: dh_python:87 dh_installdocs:60 dh_installcatalogs:46
 msgid "B<-n>, B<--noscripts>"
 msgstr "B<-n>, B<--noscripts>"
 
@@ -563,7 +563,7 @@
 "rien ne sera dépouillé, conformément à la Charte Debian."
 
 # type: =head1
-#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:62
+#: dh_strip:73 dh_compress:61 dh_usrlocal:54 dh_perl:58 dh_python:93
 msgid "CONFORMS TO"
 msgstr "CONFORMITÉ"
 
@@ -1325,7 +1325,7 @@
 
 # type: textblock
 #: dh_installmodules:40 dh_installmenu:39 dh_installmime:36 dh_makeshlibs:60
-#: dh_python:58
+#: dh_python:89
 msgid "Do not modify postinst/postrm scripts."
 msgstr "Empêche la modification des scripts de maintenance postinst et postrm."
 
@@ -4772,12 +4772,68 @@
 
 # type: textblock
 #: dh_python:23
+#, fuzzy
 msgid ""
 "The program will look at python scripts and modules in your package, and "
-"will use this information to generate a dependency on python, with the "
-"current major version, or on pythonX.Y if your scripts or modules need a "
-"specific python version. The dependency will be substituted into your "
-"package's control file wherever you place the token \"${python:Depends}\"."
+"will use this information to generate adequate dependencies. There is two "
+"scenarios: if the package uses the XS-Python-Version field then the new "
+"policy will be applied, otherwise the old policy will be used."
+msgstr ""
+"Le programme examine les scripts et les modules Perl du paquet, et exploite "
+"cette information pour produire une dépendance vers perl ou perlapi. La "
+"substitution a lieu dans le fichier S<« control »> du paquet, à "
+"l'emplacement où est indiqué S<« ${perl:Depends} »>."
+
+# type: =head2
+#: dh_python:28
+msgid "New policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:30
+msgid ""
+"The XS-Python-Version field (on the source package) defines which Python "
+"versions are supported by the package. It can be \"all\", \"current\", "
+"\"current, >= X.Y\", a single version (\"2.3\") or a list of versions with "
+"optional comparison operators (ex: \"2.3, 2.4\" or \">= 2.2, << 2.5\" or "
+"\">= 2.4\")."
+msgstr ""
+
+# type: textblock
+#: dh_python:36
+msgid ""
+"The binary packages should have a \"XB-Python-Version: ${python:Versions}\" "
+"field and dh_python will generate the right substvar for that. The resulting "
+"value can be \"all\" for public modules which work with all python versions, "
+"\"current\" for private modules which are always byte-compiled with the "
+"current python version or a list of of all versions for which the extensions "
+"have been compiled (ex: \"2.3, 2.4\"). The dependencies are adjusted "
+"accordingly as well."
+msgstr ""
+
+# type: textblock
+#: dh_python:44
+msgid ""
+"Packages with public extensions should also have a \"Provides: ${python:"
+"Provides}\" field. The corresponding substvar will indicate \"pythonX.Y-foo, "
+"pythonX.Z-foo\" according to all the extensions effectively available in the "
+"package."
+msgstr ""
+
+# type: =head2
+#: dh_python:49
+msgid "Old policy"
+msgstr ""
+
+# type: textblock
+#: dh_python:51
+#, fuzzy
+msgid ""
+"It looks at scripts and modules in your package and adds a dependency on "
+"python, with the current major version, or on pythonX.Y if your scripts or "
+"modules need a specific python version. The dependency will be substituted "
+"into your package's control file wherever you place the token \"${python:"
+"Depends}\"."
 msgstr ""
 "Le programme examinera les scripts et les modules Python du paquet et "
 "exploitera cette information pour produire une dépendance envers la version "
@@ -4787,7 +4843,7 @@
 "${python:Depends} »>."
 
 # type: textblock
-#: dh_python:29
+#: dh_python:56
 msgid ""
 "If some modules need to be byte-compiled at install time, appropriate "
 "postinst and prerm scripts will be generated. If already byte-compiled "
@@ -4799,25 +4855,32 @@
 "supprimés."
 
 # type: textblock
-#: dh_python:33
+#: dh_python:60
 msgid "If you use this program, your package should build-depend on python."
 msgstr ""
 "Si ce programme est utilisé, le paquet devrait dépendre de Python pour sa "
 "construction (build-depend)."
 
+# type: textblock
+#: dh_python:62
+msgid ""
+"Note: in the old policy, /usr/lib/site-python is also scanned for modules."
+msgstr ""
+
 # type: =item
-#: dh_python:39
+#: dh_python:68
 msgid "I<module dirs>"
 msgstr "I<module répertoires>"
 
 # type: textblock
-#: dh_python:41
+#: dh_python:70
+#, fuzzy
 msgid ""
 "If your package installs python modules in non-standard directories, you can "
 "make dh_python check those directories by passing their names on the 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."
+"line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/"
+"lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-"
+"packages."
 msgstr ""
 "Si le paquet installe les modules Python dans un répertoire non standard, il "
 "est possible de forcer dh_python à vérifier ces répertoires en passant leur "
@@ -4826,22 +4889,23 @@
 "$PACKAGE, /usr/share/games/$PACKAGE et /usr/lib/python?.?/site-packages."
 
 # type: textblock
-#: dh_python:47
+#: dh_python:75
+#, fuzzy
 msgid ""
-"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."
+"Note: only /usr/lib/python?.?/site-packages and the extra names on the "
+"command line are searched for binary (.so) modules."
 msgstr ""
 "S<Nota :> les modules binaires (.so) ne seront cherchés que dans /usr/lib/"
 "site-python, /usr/lib/python?.?/site-packages et dans les répertoires passés "
 "en argument sur la ligne de commande."
 
 # type: =item
-#: dh_python:50
+#: dh_python:78
 msgid "B<-V> I<version>"
 msgstr "B<-V> I<version>"
 
 # type: textblock
-#: dh_python:52
+#: dh_python:80
 msgid ""
 "If the .py files your package ships are meant to be used by a specific "
 "pythonX.Y version, you can use this option to specify the desired version, "
@@ -4853,22 +4917,36 @@
 "les modules sont placés dans /usr/lib/site-python."
 
 # type: textblock
-#: dh_python:64
+#: dh_python:84
+msgid ""
+"With the new policy, this option is mostly deprecated. Use the XS-Python-"
+"Field to indicate that you're using a specific python version."
+msgstr ""
+
+# type: textblock
+#: dh_python:95
 msgid "Debian policy, version 3.5.7"
 msgstr "Charte Debian, version 3.5.7"
 
 # type: textblock
-#: dh_python:66
+#: dh_python:97
 msgid "Python policy, version 0.3.7"
 msgstr "Charte Python, version 0.3.7"
 
+# type: =head1
+#: dh_python:520
+#, fuzzy
+msgid "AUTHORS"
+msgstr "AUTEUR"
+
 # type: textblock
-#: dh_python:274
-msgid "Josselin Mouette <joss@debian.org>"
+#: dh_python:522
+#, fuzzy
+msgid "Josselin Mouette <joss@debian.org> Raphael Hertzog <hertzog@debian.org>"
 msgstr "Josselin Mouette <joss@debian.org>"
 
 # type: textblock
-#: dh_python:276
+#: dh_python:525
 msgid "most ideas stolen from Brendan O'Dea <bod@debian.org>"
 msgstr "La plupart des idées ont été volées à Brendan O'Dea <bod@debian.org>"
 

Reply to: