Your message dated Thu, 05 Oct 2006 15:03:25 -0700 with message-id <[EMAIL PROTECTED]> and subject line Bug#370833: fixed in debhelper 5.0.39 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---Package: debhelper The following patch adds python-central support in debhelper. The current behaviour is unchanged, so it doesn't break existing packages. Matthias --- dh_python~ 2006-04-24 20:09:12.000000000 +0000 +++ dh_python 2006-06-07 00:27:35.217891000 +0000 @@ -13,6 +13,7 @@ =head1 SYNOPSIS B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module dirs ...>>] +B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-add-provides>] [B<-no-move>] =head1 DESCRIPTION @@ -32,10 +33,20 @@ If you use this program, your package should build-depend on python. +In pycentral mode (see below), the program will additionally generate +the ${python:Versions} and (optionally) ${python:Provides} substitutions +and move the files to the pycentral location for modules which are +shared across python versions. If you use this mode, your package must +build-depend on python-central. + =head1 OPTIONS =over 4 +Some options are ignored when the control file has an XS-Python-Version +attribute in the Source section and an XB-Python-Version attribute in +the package section (pycentral mode). + =item I<module dirs> If your package installs python modules in non-standard directories, you @@ -47,12 +58,27 @@ 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. +Module directories are ignored in pycentral mode. + =item B<-V> I<version> 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, such as 2.3. Do not use if you ship modules in /usr/lib/site-python. +This option is ignored in pycentral mode. + +=item B<--add-provides> + +Add a substitution variable "${python:Provides}". Additional provides +information is needed for packages depending on on a module or extension +for a python version, which is not the default python version. + +=item B<--no-move> + +Do not move files from /usr/lib/python2.X to the pycentral area for +files shared across python versions (pycentral mode only). + =item B<-n>, B<--noscripts> Do not modify postinst/postrm scripts. @@ -69,6 +95,88 @@ init(); +my %version_fields; +sub readpyversions { + my $type=shift; + + %version_fields=(); + + $type="" if ! defined $type; + + # Look up the build arch if we need to. + my $buildarch=''; + if ($type eq 'same') { + $buildarch=buildarch(); + } + + my $package=""; + my $arch=""; + my $pv_info=""; + my @list=(); + my %seen; + open (CONTROL, 'debian/control') || + error("cannot read debian/control: $!\n"); + while (<CONTROL>) { + chomp; + s/\s+$//; + if (/^Source:\s*(.*)/) { + $package="Source"; + } + if (/^Package:\s*(.*)/) { + $package=$1; + # Detect duplicate package names in the same control file. + if (! $seen{$package}) { + $seen{$package}=1; + } + else { + error("debian/control has a duplicate entry for $package"); + } + } + if (/^Architecture:\s*(.*)/) { + $arch=$1; + } + if (/^X.*S.*-Python-Version:\s*(.*)/) { + if ($package ne 'Source') { + error("debian/control: XS-Python-Version field in binary package"); + } + $pv_info=$1; + } + if (/^X.*B.*-Python-Version:\s*(.*)/) { + if ($package eq 'Source') { + error("debian/control: XB-Python-Version field in source package"); + } + $pv_info=$1; + } + + if (!$_ or eof) { # end of stanza. + if ($package) { + $version_fields{$package}=$pv_info; + } + if ($package eq 'Source' && $pv_info eq '') { + error("missing XS-PythonVersion for source package"); + } + if ($package && + (($type eq 'indep' && $arch eq 'all') || + ($type eq 'arch' && $arch ne 'all') || + ($type eq 'same' && ($arch eq 'any' || $arch =~ /(^|\s)$buildarch(\s|$)/)) || + ! $type)) { + #if ($pv_info eq '') { + # error("missing XB-PythonVersion for `$package' package"); + #} + push @list, $package; + $package=""; + $arch=""; + $pv_info=""; + } + } + } + close CONTROL; + + return @list; +} + +my @pypackages = readpyversions(); + my $python = 'python'; # The current python major version @@ -88,7 +196,7 @@ my $python_nextversion = $python_version + 0.1; 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/; } @@ -120,6 +228,8 @@ my $tmp = tmpdir($package); delsubstvar($package, "python:Depends"); + delsubstvar($package, "python:Provides"); + delsubstvar($package, "python:Versions"); 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 ); @@ -128,6 +238,42 @@ my $strong_dep = 0; my $look_for_pythonXY = 1; + if ($version_fields{$package}) { + if (!$version_fields{"Source"}) { + error("XS-Python-Version attribute missing in source package"); + } + if (! -x "/usr/bin/pycentral") { + error("python-central misssing, please install"); + } + my $pycmd = "pycentral debhelper --stdout"; + if ($dh{ONLYSCRIPTS}) { + $pycmd = "$pycmd --no-act"; + } + #if ($dh{ADD_PROVIDES}) { + # $pycmd = "$pycmd --provides"; + #} + #if ($dh{NO_MOVE}) { + # $pycmd = "$pycmd --no-move"; + #} + $pycmd = "$pycmd $package"; + verbose_print("$pycmd"); + open(PYCENTRAL, "$pycmd |") or die "cannot start pycentral"; + while (<PYCENTRAL>) { + chomp; + if (/^([^=]+)=(.*)/) { + addsubstvar($package, "$1", $2); + } else { + error("internal pycentral error: $_"); + } + } + close(PYCENTRAL) || exit $?; + + if (! $dh{NOSCRIPTS}) { + autoscript($package,"postinst","postinst-pycentral","s%#PACKAGE#%$package%"); + autoscript($package,"prerm","prerm-pycentral","s%#PACKAGE#%$package%"); + } + } else { + # current behaviour of dh_python # First, the case of python-foo and pythonX.Y-foo if ($package =~ /^python-/) { $dep_on_python = 1; @@ -261,6 +407,7 @@ if ($need_prerm && ! $dh{NOSCRIPTS}) { autoscript($package,"prerm","prerm-python","s%#PACKAGE#%$package%"); } + }# current behaviour of dh_python } =head1 SEE ALSO
--- End Message ---
--- Begin Message ---Source: debhelper Source-Version: 5.0.39 We believe that the bug you reported is fixed in the latest version of debhelper, which is due to be installed in the Debian FTP archive: debhelper_5.0.39.dsc to pool/main/d/debhelper/debhelper_5.0.39.dsc debhelper_5.0.39.tar.gz to pool/main/d/debhelper/debhelper_5.0.39.tar.gz debhelper_5.0.39_all.deb to pool/main/d/debhelper/debhelper_5.0.39_all.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Joey Hess <[EMAIL PROTECTED]> (supplier of updated debhelper package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Tue, 3 Oct 2006 13:02:24 -0400 Source: debhelper Binary: debhelper Architecture: source all Version: 5.0.39 Distribution: unstable Urgency: low Maintainer: Joey Hess <[EMAIL PROTECTED]> Changed-By: Joey Hess <[EMAIL PROTECTED]> Description: debhelper - helper programs for debian/rules Closes: 189474 253582 358392 370833 373853 374776 375576 375936 375948 378604 381389 Changes: debhelper (5.0.39) unstable; urgency=low . * dh_python: Also be a no-op if there's a Python-Version control file field. . debhelper (5.0.38) unstable; urgency=low . [ Valery Perrin ] * Update french translation with recent change in dh_installmodules . [ Joey Hess] * ACK last three NMUs with thanks to Raphael Hertzog for making the best of a difficult situation. * Revert all dh_python changes. Closes: #381389, #378604 * Conflict with python-support <= 0.5.2 and python-central <= 0.5.4. * Make dh_python do nothing if debian/pycompat is found. The new versions of dh_pysupport or dh_pycentral will take care of everything dh_python used to do in this situation. * dh_python is now deprecated. Closes: #358392, #253582, #189474 * move po4a to Build-Depends as it's run in clean. * Add size test, which fails on any debhelper program of more than 150 lines (excluding POD). This is not a joke, and 100 lines would be better. * Add size test exception for dh_python, since it's deprecated. . debhelper (5.0.37.3) unstable; urgency=low . * Non-maintainer upload. * Update of dh_python - when buidling for a non-standard Python version, generate more reasonable Depends like "python (>= X.Y) | pythonX.Y" Closes: #375576 - fix handling of private extensions. Closes: #375948 - fix parsing of XS-Python-Version, it didn't work if only fixed versions were listed in XS-Python-Version. - fix use of unitialized value. Closes: #374776 - fix typos in POD documentation. Closes: #375936 . debhelper (5.0.37.2) unstable; urgency=low . * Non-maintainer upload. * Update of dh_python - vastly refactored, easier to understand, and the difference between old policy and new policy is easier to grasp - it supports an -X option which can be used to not scan some files - uses debian/pyversions as reference source of information for dependencies but also parse the XS-Python-Version header as fallback. - ${python:Versions}'s default value is XS-Python-Version's value instead of "all" when the package doesn't depend on a specific python version. Closes: #373853 - always generate ${python:Provides} and leave the responsibility to the maintainer to not use ${python:Provides} if he doesn't want the provides. - uses debian/pycompat or DH_PYCOMPAT as reference field to run in new policy mode. The presence of XS-Python-Version will also trigger the new policy mode (this is for short-term compatibility, it may be removed in the not too-distant future). DH_PYCOMPAT=1 is the default mode and is compatible to the old policy. DH_PYCOMPAT=2 is the new mode and is compatible with the new policy. * Use "grep ^Version:" instead of "grep Version:" on the output of dpkg-parsechangelog since the above changelog entry matched "Version:" and thus made the build fail. . debhelper (5.0.37.1) unstable; urgency=low . * Non-maintainer upload. * Integrate the new dh_python implementing the new Python policy. Closes: #370833 Files: 15b865b7547f03ca7e004390dc23d293 539 devel optional debhelper_5.0.39.dsc f53141a41809277877495c12d2925b35 264600 devel optional debhelper_5.0.39.tar.gz c1853d15602f18afa20bb387984bccc1 510310 devel optional debhelper_5.0.39_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFIpgQ2tp5zXiKP0wRAgAnAKCY1l/DKrPb9GH/FBa+Vbs6/c9uUwCfYX9E 4hnBoJFpGQWsmY4tFw5WoOI= =96q9 -----END PGP SIGNATURE-----
--- End Message ---

