Bug#379455: Python Policy suggests dependencies that prevent the replacement of real packages by virtual ones

2006-07-23 Thread Loïc Minier
Package: python-defaults
Severity: important
Tags: patch

Hi,

 As explained on debian-python@ in the attached message...

 Here's a patch.

   Bye,
-- 
Loïc Minier [EMAIL PROTECTED]
---BeginMessage---
Hi,

 Python Policy 3.2 states:

 3.2 Programs Using a Particular Python Version

 A program which requires a specific version of Python must begin with
 #!/usr/bin/pythonX.Y (or #!/usr/bin/env pythonX.Y). It must also
 specify a dependency on pythonX.Y and on any pythonX.Y-foo package
 providing necessary modules. It should not depend on any python-foo
 package, unless it requires a specific version of the package (since
 virtual packages cannot be versioned). If this is the case, it should
 depend on both the virtual package and the main package (e.g. Depends:
 python2.4-foo, python-foo (= 1.0)).


 Consider gnome-osd which depended on python2.4-pyorbit-omg before
 pyorbit was transitioned.  Now pyorbit only ships python-pyorbit-omg
 which Provides python2.4-pyorbit-omg, but users with gnome-osd
 installed -- and hence python2.4-pyorbit-omg as a real package
 installed -- won't get python-pyorbit-omg.

 Shouldn't such packages Depend on python-pyorbit-omg,
 python2.4-pyorbit-omg, even if they don't need a particular version of
 python-pyorbit-omg (contrarily to what 3.2 §2 requests)?

   Bye,
-- 
Loïc Minier [EMAIL PROTECTED]
---End Message---
diff -urN python-defaults-2.4.3-5/debian/changelog 
python-defaults-2.4.3-6/debian/changelog
--- python-defaults-2.4.3-5/debian/changelog2006-06-16 18:15:25.0 
+0200
+++ python-defaults-2.4.3-6/debian/changelog2006-07-23 19:59:50.0 
+0200
@@ -1,3 +1,11 @@
+python-defaults (2.4.3-6) unstable; urgency=low
+
+  * Recommend depending on pythonX.X-foo, python-foo instead of recommending
+to only depend on pythonX.X-foo when a particular version is needed to
+permit upgrades from real packages to virtual ones. (Closes: XX)
+
+ -- Loic Minier [EMAIL PROTECTED]  Sun, 23 Jul 2006 19:58:17 +0200
+
 python-defaults (2.4.3-5) experimental; urgency=low
 
   * Tighten dependencies between packages built from this source.
diff -urN python-defaults-2.4.3-5/debian/python-policy.sgml 
python-defaults-2.4.3-6/debian/python-policy.sgml
--- python-defaults-2.4.3-5/debian/python-policy.sgml   2006-06-13 
01:28:48.0 +0200
+++ python-defaults-2.4.3-6/debian/python-policy.sgml   2006-07-23 
19:58:03.0 +0200
@@ -451,13 +451,11 @@
  must also specify a dependency on
  packagepythonvarX/var.varY/var/package and on
  any packagepythonvarX/var.varY/var-foo/package
- package providing necessary modules. It should not depend on
- any packagepython-foo/package package, unless it
- requires a specific version of the package (since virtual
- packages cannot be versioned). If this is the case, it
- should depend on both the virtual package and the main
- package (e.g. ttDepends: python2.4-foo, python-foo (=
- 1.0)/tt).
+ package providing necessary modules.  It should also depend on
+ the corresponding packagepython-foo/package packages, to
+ ease upgrades from real to virtual packages; this is also the
+ only way to depend on a particular version of the package
+ (since virtual packages cannot be versioned).
/p
p
  The notes on installation directories and bytecompilation


Re: Python Policy suggests dependencies that prevent installation

2006-07-23 Thread Steve Langasek
On Sun, Jul 23, 2006 at 07:08:52PM +0200, Loïc Minier wrote:

  Python Policy 3.2 states:

  3.2 Programs Using a Particular Python Version

  A program which requires a specific version of Python must begin with
  #!/usr/bin/pythonX.Y (or #!/usr/bin/env pythonX.Y). It must also
  specify a dependency on pythonX.Y and on any pythonX.Y-foo package
  providing necessary modules. It should not depend on any python-foo
  package, unless it requires a specific version of the package (since
  virtual packages cannot be versioned). If this is the case, it should
  depend on both the virtual package and the main package (e.g. Depends:
  python2.4-foo, python-foo (= 1.0)).

  Consider gnome-osd which depended on python2.4-pyorbit-omg before
  pyorbit was transitioned.  Now pyorbit only ships python-pyorbit-omg
  which Provides python2.4-pyorbit-omg, but users with gnome-osd
  installed -- and hence python2.4-pyorbit-omg as a real package
  installed -- won't get python-pyorbit-omg.

  Shouldn't such packages Depend on python-pyorbit-omg,
  python2.4-pyorbit-omg, even if they don't need a particular version of
  python-pyorbit-omg (contrarily to what 3.2 §2 requests)?

Are we talking about the case in which /usr/bin/python is still  2.4, or
are we talking about what such packages should do Coming Soon?

For the latter, they should obviously be fixed to not use /usr/bin/pythonX.Y
at all.

For the former, no, it's not the business of end-user packages in general to
attempt to force obsolete versions of dependencies off the system when
they're functionally compatible.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


signature.asc
Description: Digital signature