Hi Damien and Antoine, Antoine Jacoutot wrote on Sun, Dec 28, 2008 at 01:01:56PM +0100: > On Sun, 28 Dec 2008, Damien Miller wrote:
>> Ok, but I think it should be: >> >> @conflict python-bz2->2.5,<=2.5.2p7 >> @conflict python-expat->2.5,<=2.5.2p7 >> @conflict python-sqlite->2.5,<=2.5.2p7 >> >> Otherwise it would mess up the ability to install more than one python >> version simultaneously. > ack >> Is there any nice way to say that a package (e.g. python-2.6.1) replaces >> another package entirely (e.g. python-bz2-2.6)? > You could use an @pkgpath marker. > e.g. in ports/lang/python/2.5/pkg/PLIST-main: > @pkgpath lang/python/2.5,-bz2 For the case of Python 2.6, i just tested the following diff on i386-current. Note that i also changed @conflict python->=2.6,<2.6 because that looks somewhat fishy. ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- Index: lang/python/2.6/pkg/PLIST-main =================================================================== RCS file: /cvs/ports/lang/python/2.6/pkg/PLIST-main,v retrieving revision 1.1 diff -u -r1.1 PLIST-main --- lang/python/2.6/pkg/PLIST-main 18 Oct 2008 12:03:56 -0000 1.1 +++ lang/python/2.6/pkg/PLIST-main 28 Dec 2008 13:11:34 -0000 @@ -1,7 +1,9 @@ @comment $OpenBSD: PLIST-main,v 1.1 2008/10/18 12:03:56 djm Exp $ @option no-default-conflict -...@conflict python->=2.6,<2.6 +...@conflict python->=2.6,<2.7 +...@conflict python-bz2->=2.6,<2.7 @pkgpath lang/python/2.6 +...@pkgpath lang/python/2.6,-bz2 bin/2to3 @comment bin/pydoc bin/pydoc2.6 @@ -1235,7 +1237,7 @@ [...] ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- I tested this together with the large diff posted by Damien. This builds, installs and updates fine. It leaves old versions alone as it should. Updating from 2.6p0 to 2.6.1 removes python-bz2-2.6p0 as it should: ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- schwa...@hera $ pkg_info | grep py python-2.4.4p8 interpreted object-oriented programming language python-2.5.2p7 interpreted object-oriented programming language python-2.6p0 interpreted object-oriented programming language python-bz2-2.4.4p8 bz2 module for Python python-bz2-2.5.2p7 bz2 module for Python python-bz2-2.6p0 bz2 module for Python python-expat-2.4.4p8 expat module for Python python-expat-2.5.2p7 expat module for Python python-sqlite-2.5.2p7 sqlite database module for Python schwa...@hera $ sudo pkg_add -uiv Candidates for updating python-2.6p0 -> python-2.6.1 Looking for updates: complete Cannot find updates for [...] Proceed? [y/N] y Running the equivalent of pkg_add -r python-2.6.1 parsing python-2.6.1 Dependencies for python-2.6.1 resolve to: bzip2-1.0.5, sqlite3-3.6.4p0 found libspec [...] python-2.6.1 (extracting): complete python-bz2-2.6p0 (deleting): complete python-2.6p0 (deleting): complete python-2.6.1 (installing): complete Clean shared items: complete --- python-2.6.1 ------------------- [...] schwa...@hera $ pkg_info | grep py python-2.4.4p8 interpreted object-oriented programming language python-2.5.2p7 interpreted object-oriented programming language python-2.6.1 interpreted object-oriented programming language python-bz2-2.4.4p8 bz2 module for Python python-bz2-2.5.2p7 bz2 module for Python python-expat-2.4.4p8 expat module for Python python-expat-2.5.2p7 expat module for Python python-sqlite-2.5.2p7 sqlite database module for Python ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- Downgrading from 2.6.1 to 2.6p0 (using -r) works, too, and after that, it is possible to reinstall python-bz2-2.6p0. I shall have a look at the 2.4 and 2.5, too. Yours, Ingo