Subject: Re: pkg_add -u doesn't work to update conflicting package
To: Jeremy C. Reed <>
From: Greg Troxel <>
List: tech-pkg
Date: 10/30/2007 12:38:43
  So I have installed:


  I want to update:

  $ pkg_add -u Conf-

  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 

  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 

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.