Bug#381389: dh_pycentral patch

2006-10-04 Thread Raphael Hertzog
On Tue, 03 Oct 2006, Joey Hess wrote:
 Raphael Hertzog wrote:
  Yes you should IMO because the current dh_python assumes pycompat==2 if
  there's no pycompat file and if there's a Python-Version control field.
  
  That's because pycompat has only been introduced after the start of the
  migration when Josselin decided to change his mind...
 
 Ok, done in a new version of debhelper I've uploaded to the 3-day
 delayed queue. Only 3 days left to sort everything out..

I had a quick chat with doko last night:
buxy doko__: have you seen the upcoming dh_python changes? you need to act 
quickly!
doko__ will do, will revert them
buxy doko__: revert them?
doko__ when did you test pycentral debhelper the last time? the risk is too 
high for regressions, so I'll integrate the current dh_python in dh_pycentral
buxy doko__: indeed, pycentral debhelper has not been tested much, Madcoder 
did some recent test, on the other hand the current dh_python also has an RC 
bug but I can try to fix it if you plan to use that code
buxy doko__: do you have a bzr branch for python-central?
doko__ buxy: that would be nice; I hope to get long-term a library module for 
the dependency stuff. not yet; mvo already asked ...

So it looks like I'll fix my dh_python code (cf the RC bug already
reported) and then merge it into dh_pycentral.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Bug#381389: dh_pycentral patch

2006-10-04 Thread Raphael Hertzog
Context for debian-python: we're deprecating dh_python on Joey's request
and thus move the logic of substvars generation into
dh_pycentral/dh_pysupport. debhelper/python-central/python-support will
be jointly uploaded in 2 days (the packages are in DELAYED/2-days right now)
to make that happen.

We need to make sure that we didn't break anything by doing so.

On Tue, 03 Oct 2006, Joey Hess wrote:
 Ok, done in a new version of debhelper I've uploaded to the 3-day
 delayed queue. Only 3 days left to sort everything out..

I prepared an updated of python-central which integrates the dh_python
code into dh_pycentral. It's here:
http://people.debian.org/~hertzog/packages/python-central.patch
http://people.debian.org/~hertzog/packages/python-central_0.5.6.dsc
Doko has more changes for python-central, he will merge my changes
and upload the final package into DELAYED/2-day.

Now it's time to test the combination. Someone should install
the three packages:
http://people.debian.org/~hertzog/packages/python-central_0.5.6_all.deb
http://people.debian.org/~hertzog/packages/debhelper_5.0.39_all.deb
http://people.debian.org/~hertzog/packages/python-support_0.5.3_all.deb
(I had to use dpkg --force-conflicts -i *.deb, giving dpkg -iGROEB *.deb didn't
work)

And then recompile many python packages using
python-support/python-central and watch out differences (in the generated
dependencies in particular).

Some help is welcome. My first tests with dh_pycentral are good but I only
checked 2 packages.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Bug#381389: dh_pycentral patch

2006-10-03 Thread Raphael Hertzog
On Mon, 02 Oct 2006, Pierre Habouzit wrote:
  Another problem with smart-notifier is that it calls dh_python but
  lacks a pycompat file, so the new dh_python will do old-style stuff
  with it, including adding a postinst call to compileall.py.
 
 that's RC then. and a packaging problem, not our own.
 
  I thought that making dh_python a NOOP if there was a pycompat file
  was good enough, but this package seems to say otherwise? It seems
  that dh_python also needs to be a NOOP if Python-Version is set. Can
  someone verify that for me?

Yes I confirm that.

 well, you can do that too, but using dh_python to generate the substvars 
 for the new policy needed a pycompat if using dh_py* + dh_python. 
 That's a packaging problem. You should not care about it.

Yes you should IMO because the current dh_python assumes pycompat==2 if
there's no pycompat file and if there's a Python-Version control field.

That's because pycompat has only been introduced after the start of the
migration when Josselin decided to change his mind...

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Bug#381389: dh_pycentral patch

2006-10-03 Thread Joey Hess
Raphael Hertzog wrote:
 Yes you should IMO because the current dh_python assumes pycompat==2 if
 there's no pycompat file and if there's a Python-Version control field.
 
 That's because pycompat has only been introduced after the start of the
 migration when Josselin decided to change his mind...

Ok, done in a new version of debhelper I've uploaded to the 3-day
delayed queue. Only 3 days left to sort everything out..

-- 
see shy jo


signature.asc
Description: Digital signature


Bug#381389: dh_pycentral patch

2006-10-02 Thread Pierre HABOUZIT
  Hi,

  Attached is the patch for python-central.

  I've tested on 5 packages yet, and it seems to work correctly on
packages with public modules. Though it seems that it completely fails
with packages with private modules, (like smart-notifier)

  Also note that smart-notifier packaging is buggy as it should not ask
for XS-P-V: 2.4 but = 2.3 if not all.

  though that does not changes a damn thing, and would break other
packages anyway.


  I don't know what we can do right now…

-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org
diff -Nru /tmp/fG5nniozYb/python-central-0.5.5/debian/changelog 
/tmp/BEsnhUlqXr/python-central-0.5.5/debian/changelog
--- /tmp/fG5nniozYb/python-central-0.5.5/debian/changelog   2006-08-13 
21:13:28.0 +0200
+++ /tmp/BEsnhUlqXr/python-central-0.5.5/debian/changelog   2006-10-02 
14:28:12.0 +0200
@@ -1,3 +1,10 @@
+python-central (0.5.5-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Make python-central generate substvars and not rely on dh_python anymore.
+
+ -- Pierre Habouzit [EMAIL PROTECTED]  Mon,  2 Oct 2006 14:28:08 +0200
+
 python-central (0.5.5) unstable; urgency=low
 
   * Update pycentral(1). Closes: #382157.
diff -Nru /tmp/fG5nniozYb/python-central-0.5.5/dh_pycentral 
/tmp/BEsnhUlqXr/python-central-0.5.5/dh_pycentral
--- /tmp/fG5nniozYb/python-central-0.5.5/dh_pycentral   2006-06-18 
05:29:24.0 +0200
+++ /tmp/BEsnhUlqXr/python-central-0.5.5/dh_pycentral   2006-10-02 
14:26:38.0 +0200
@@ -52,8 +52,8 @@
 foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp = tmpdir($package);
 
-   # Move *.py files if needed
-   doit(pycentral debhelper $package $tmp);
+   # Move *.py files if needed and generate dependencies
+   doit(pycentral debhelper --substvars=file --provides $package $tmp);
 
# Check that we have *.py files!
my $found = 0;
@@ -64,7 +64,6 @@
}, $tmp;
 
if ($found or -d $tmp/usr/share/pycentral) {
-addsubstvar($package, python:Depends, python-central, = 
0.5);
 if (! $dh{NOSCRIPTS}) {
 
autoscript($package,postinst,postinst-pycentral,s%#PACKAGE#%$package%);
 
autoscript($package,prerm,prerm-pycentral,s%#PACKAGE#%$package%);
diff -Nru /tmp/fG5nniozYb/python-central-0.5.5/pycentral.py 
/tmp/BEsnhUlqXr/python-central-0.5.5/pycentral.py
--- /tmp/fG5nniozYb/python-central-0.5.5/pycentral.py   2006-08-13 
21:06:45.0 +0200
+++ /tmp/BEsnhUlqXr/python-central-0.5.5/pycentral.py   2006-10-02 
14:31:26.0 +0200
@@ -384,7 +384,7 @@
 if self.sversion_field == None:
 raise PyCentralError, 'missing XS-Python-Version attribute'
 if self.parse_versions:
-self.sversion_info = parse_versions(self.sversion_field)
+self.sversion_info = pyversions.parse_versions(self.sversion_field)
 else:
 self.sversion_info = 'all' # dummy
 self.has_private_extension = self.sversion_info == 'current_ext'


signature.asc
Description: Digital signature


Bug#381389: dh_pycentral patch

2006-10-02 Thread Joey Hess
Pierre HABOUZIT wrote:
   I've tested on 5 packages yet, and it seems to work correctly on
 packages with public modules. Though it seems that it completely fails
 with packages with private modules, (like smart-notifier)
 
   Also note that smart-notifier packaging is buggy as it should not ask
 for XS-P-V: 2.4 but = 2.3 if not all.

Another problem with smart-notifier is that it calls dh_python but lacks
a pycompat file, so the new dh_python will do old-style stuff with it,
including adding a postinst call to compileall.py.

I thought that making dh_python a NOOP if there was a pycompat file was
good enough, but this package seems to say otherwise? It seems that
dh_python also needs to be a NOOP if Python-Version is set. Can someone
verify that for me?

   though that does not changes a damn thing, and would break other
 packages anyway.
 
 
   I don't know what we can do right now…

Well, the other thing we could do is put a private copy of dh_python
into pycentral (not in path) and make dh_pycentral call it and be
otherwise unchanged.

Very ugly and it might mean that pycentral would inherit RC bugs like
#381389 from dh_python.

-- 
see shy jo


signature.asc
Description: Digital signature


Bug#381389: dh_pycentral patch

2006-10-02 Thread Pierre Habouzit
Le lun 2 octobre 2006 18:17, Joey Hess a écrit :
 Pierre HABOUZIT wrote:
I've tested on 5 packages yet, and it seems to work correctly on
  packages with public modules. Though it seems that it completely
  fails with packages with private modules, (like smart-notifier)
 
Also note that smart-notifier packaging is buggy as it should not
  ask for XS-P-V: 2.4 but = 2.3 if not all.

 Another problem with smart-notifier is that it calls dh_python but
 lacks a pycompat file, so the new dh_python will do old-style stuff
 with it, including adding a postinst call to compileall.py.

that's RC then. and a packaging problem, not our own.

 I thought that making dh_python a NOOP if there was a pycompat file
 was good enough, but this package seems to say otherwise? It seems
 that dh_python also needs to be a NOOP if Python-Version is set. Can
 someone verify that for me?

well, you can do that too, but using dh_python to generate the substvars 
for the new policy needed a pycompat if using dh_py* + dh_python. 
That's a packaging problem. You should not care about it.


though that does not changes a damn thing, and would break other
  packages anyway.
 
 
I don't know what we can do right now…

 Well, the other thing we could do is put a private copy of dh_python
 into pycentral (not in path) and make dh_pycentral call it and be
 otherwise unchanged.

 Very ugly and it might mean that pycentral would inherit RC bugs like
 #381389 from dh_python.

that's right :|

-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpUOqnrIGcDS.pgp
Description: PGP signature