Subject: Re: pkg_add -u doesn't work to update conflicting package
To: Jeremy C. Reed <reed@reedmedia.net>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-pkg
Date: 10/30/2007 12:38:43
So I have installed:
GConf2-2.14.0
I want to update:
$ pkg_add -u Conf-2.18.0.1nb1.tgz
pkg_add: Conflicting package `GConf2-2.14.0'installed, please use
"pkg_delete GConf2-2.14.0" first to remove it!
pkg_add: 1 package addition failed
I see that pkgsrc/devel/GConf/Makefile has:
CONFLICTS+= GConf2-[0-9]*
How to tell pkg_add that this is replacement?
So this reminds me of our September thread "difficulty from renaming
packages, and how to deal". It was suggested we add a setting to the
Makefiles to note the replacement. So if this existed -- pkg_add could
ignore the CONFLICTS if the PREV_PKGNAME had the same PKGBASE as the
CONFLICTS.
Now I have many packages depending on GConf2.
I need to somehow convince them to depend on GConf (no 2) instead.
I can do this manually. But I was hoping to save time by using binary
packages.
This is the same problem as I was addressing with the rename database
for pkg_rolling-replace.
You can hack around this by saving the +REQUIRED_BY in GConf2, removing
it, doing the pkg_delete, and then pkg_add of new one, and putting it
back. I suppose it would be good to add an option to pkg_add to tell it
the 'old package' to be replaced. I intend to have make replace have
this feature when I get around to it.