On Sun, Dec 28, 2008 at 01:01:56PM +0100, Antoine Jacoutot wrote:
> On Sun, 28 Dec 2008, Damien Miller wrote:
> > > e.g. something like the following in lang/python/2.5/pkg/PLIST-main:
> > > @conflict python-bz2-<=2.5.2p7
> > 
> > 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

Could someone give me practical example why @pkgpath is needed for?

I've tested `pkg_add -ui` with already installed driconf package which
depends on old python-expat package. In PKG_PATH I've had only
python-2.5.4 with all subpackages from current port (no driconf package
with updated dependencies). Update was smooth, but pkg_add asks you
about forward dependency mismatch.

Tested same setup again updating to python-2.5.4p0 (with additional
pkgpaths, see attachment) and what I can see conflict markers are enough
for smooth upgrade in both cases, but here again pkg_add asks you about
forward dependency mismatch. I would think that shouldn't be the case
with additional pkgpaths.

For me attached patch brings correctness to python ports, but in
practice that doesn't give anything. So why @pkgpath marker is for?

-- 
best regards
q#
Index: 2.4/Makefile
===================================================================
RCS file: /cvs/ports/lang/python/2.4/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- 2.4/Makefile        1 Jan 2009 21:03:27 -0000       1.20
+++ 2.4/Makefile        2 Jan 2009 13:43:11 -0000
@@ -2,7 +2,7 @@
 
 VERSION=               2.4
 PATCHLEVEL=            .6
-#PKG_PATCHLEVEL=               
+PKG_PATCHLEVEL=                p0
 SHARED_LIBS=           python2.4 1.0
 
 .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || 
${MACHINE_ARCH} == "sparc64"
Index: 2.4/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/python/2.4/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -r1.2 PLIST-main
--- 2.4/pkg/PLIST-main  1 Jan 2009 21:03:27 -0000       1.2
+++ 2.4/pkg/PLIST-main  2 Jan 2009 13:43:11 -0000
@@ -4,6 +4,8 @@
 @conflict python-bz2->=2.4,<2.5
 @conflict python-expat->=2.4,<2.5
 @pkgpath lang/python/2.4
+...@pkgpath lang/python/2.4,-bz2
+...@pkgpath lang/python/2.4,-expat
 %%mm%%
 bin/pydoc2.4
 @bin bin/python2.4
Index: 2.5/Makefile
===================================================================
RCS file: /cvs/ports/lang/python/2.5/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- 2.5/Makefile        1 Jan 2009 21:03:27 -0000       1.28
+++ 2.5/Makefile        2 Jan 2009 13:43:11 -0000
@@ -2,7 +2,7 @@
 
 VERSION=               2.5
 PATCHLEVEL=            .4
-#PKG_PATCHLEVEL=               
+PKG_PATCHLEVEL=                p0
 SHARED_LIBS=           python2.5 1.0
 
 .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || 
${MACHINE_ARCH} == "sparc64"
Index: 2.5/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/python/2.5/pkg/PLIST-main,v
retrieving revision 1.9
diff -u -r1.9 PLIST-main
--- 2.5/pkg/PLIST-main  1 Jan 2009 21:03:27 -0000       1.9
+++ 2.5/pkg/PLIST-main  2 Jan 2009 13:43:12 -0000
@@ -5,6 +5,9 @@
 @conflict python-expat->=2.5,<2.6
 @conflict python-sqlite->=2.5,<2.6
 @pkgpath lang/python/2.5
+...@pkgpath lang/python/2.5,-bz2
+...@pkgpath lang/python/2.5,-expat
+...@pkgpath lang/python/2.5,-sqlite
 bin/pydoc2.5
 @comment bin/python-config
 @bin bin/python2.5
Index: 2.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/python/2.6/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- 2.6/Makefile        1 Jan 2009 21:03:27 -0000       1.3
+++ 2.6/Makefile        2 Jan 2009 13:43:12 -0000
@@ -2,7 +2,7 @@
 
 VERSION=               2.6
 PATCHLEVEL=            .1
-#PKG_PATCHLEVEL=               
+PKG_PATCHLEVEL=                p0
 SHARED_LIBS=           python2.6 1.0
 
 # PSUBDIR=             python/${VERSION}
Index: 2.6/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/python/2.6/pkg/PLIST-main,v
retrieving revision 1.2
diff -u -r1.2 PLIST-main
--- 2.6/pkg/PLIST-main  1 Jan 2009 21:03:27 -0000       1.2
+++ 2.6/pkg/PLIST-main  2 Jan 2009 13:43:12 -0000
@@ -3,6 +3,7 @@
 @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

Reply via email to