removing package db entires for manually installed files

At one point while I was trying to get various python programs to work, I tried running easy_install -U setuptools

However, now running pkg upgrade now fails even with the -f option.

I get error messages like:
Code:
Conflict found on path /usr/local/lib/python2.7/site-packages/setuptools/version.pyc between py27-setuptools-2.0.1(devel/py-setuptools) and py27-setuptools27-2.0.1(devel/py-setuptools27)
... for every file installed by py27-setuptools27

I know it is a database problem because the error persists even after running the following command as root:
rm -r /usr/local/lib/python2.7/
I was able to confirm the deletion with:
ls /usr/local/lib/python2.7/

I aslo tried:
pkg delete -f py27-setuptools-2.0.1
(the -f option was needed due to dependencies)... followed by:
pkg install py27-setuptools-2.0.1
...Which apparently completed with no errors

However, the above error persists upon upgrade.

Edit: the list of packages to be ugraded/reinstalled:
Code:
root@casey:~ # pkg upgrade -f
Updating repository catalogue
Upgrades have been requested for the following 112 packages:

        Reinstalling autoconf-wrapper-20131203
        Reinstalling automake-wrapper-20131203
        Reinstalling boost-docs-1.55.0
        Reinstalling boost-jam-1.55.0
        Upgrading ca_root_nss: 3.15.4 -> 3.16
        Reinstalling cmake-modules-2.8.12.1_1
        Upgrading curl: 7.35.0 -> 7.36.0
        Reinstalling cvsps-2.1_1
        Reinstalling damageproto-1.2.1
        Reinstalling db48-4.8.30.0
        Reinstalling dialog4ports-0.1.5_2
        Reinstalling dri2proto-2.8
        Reinstalling expat-2.1.0
        Reinstalling fixesproto-5.0
        Upgrading freetype2: 2.5.2 -> 2.5.3_2
        Reinstalling gcc-ecj-4.5
        Upgrading gmp: 5.1.3_1 -> 5.1.3_2
        Reinstalling icu-52.1
        Reinstalling inputproto-2.3
        Reinstalling jbigkit-1.6
        Reinstalling jpeg-8_4
        Reinstalling kbproto-1.0.6
        Reinstalling libffi-3.0.13_1
        Upgrading libiconv: 1.14_2 -> 1.14_3
        Reinstalling libpthread-stubs-0.3_4
        Reinstalling libtool-2.4.2_2
        Upgrading libxml2: 2.8.0_3 -> 2.8.0_5
        Reinstalling m4-1.4.17_1,1
        Upgrading mpfr: 3.1.2_1 -> 3.1.2_2
        Upgrading openssl: 1.0.1_9 -> 1.0.1_11
        Upgrading pciids: 20140222 -> 20140402
        Reinstalling pcre-8.34
        Upgrading perl5: 5.16.3_7 -> 5.16.3_9
        Reinstalling pkg-1.2.7_2
        Reinstalling pkgconf-0.9.5
        Reinstalling png-1.5.18
        Reinstalling qmake-3.3.8_1
        Reinstalling randrproto-1.4.0
        Reinstalling renderproto-0.11.1
        Upgrading sqlite3: 3.8.3.1 -> 3.8.4.2
        Upgrading xextproto: 7.2.1 -> 7.3.0
        Reinstalling xf86vidmodeproto-2.3.1
        Reinstalling xproto-7.0.25
        Reinstalling autoconf-2.69
        Reinstalling autoconf213-2.13.000227_6
        Reinstalling automake-1.14
        Reinstalling automake14-1.4.6_6
        Reinstalling autotools-20130627
        Upgrading boost-libs: 1.55.0 -> 1.55.0_1
        Upgrading cmake: 2.8.12.1_2 -> 2.8.12.1_4
        Upgrading fontconfig: 2.11.0_1,1 -> 2.11.0_2,1
        Reinstalling gettext-0.18.3.1
        Installing p5-Net-SSLeay: 1.58_1
        Installing p5-Socket: 2.013
        Installing p5-IO-Socket-IP: 0.29
        Reinstalling gmake-3.82_1
        Reinstalling iconv-2.0_4
        Upgrading libICE: 1.0.8,1 -> 1.0.8_2,1
        Upgrading libSM: 1.2.2,1 -> 1.2.2_2,1
        Upgrading libXau: 1.0.8 -> 1.0.8_2
        Upgrading libXdmcp: 1.1.1 -> 1.1.1_2
        Upgrading libpciaccess: 0.13.2 -> 0.13.2_2
        Upgrading libxcb: 1.9.3 -> 1.10_2
        Reinstalling mpc-1.0.2
        Reinstalling p5-Error-0.17022
        Reinstalling pypy-2.2.1
        Reinstalling python27-2.7.6_4
        Reinstalling binutils-2.24
        Upgrading bitcoin-daemon: 0.8.6_1 -> 0.9.1
        Reinstalling boost-all-1.55.0
        Upgrading gcc47: 4.7.4.20140315 -> 4.7.4.20140419
        Installing p5-IO-Socket-SSL: 1.981
        Reinstalling glib-2.36.3_2
        Upgrading libX11: 1.6.2,1 -> 1.6.2_2,1
        Upgrading libXext: 1.3.2,1 -> 1.3.2_2,1
        Upgrading libXfixes: 5.0.1 -> 5.0.1_2
        Upgrading libXi: 1.7.2,1 -> 1.7.2_2,1
        Upgrading libXrender: 0.9.8 -> 0.9.8_2
        Upgrading libXt: 1.1.4,1 -> 1.1.4_2,1
        Upgrading libXxf86vm: 1.1.3 -> 1.1.3_2
        Reinstalling libdrm-2.4.17_1
        Upgrading p5-Net-SMTP-SSL: 1.01_1 -> 1.01_2
->   Installing py27-setuptools27: 2.0.1
        Reinstalling py27-asn1-0.1.4_1,1
        Reinstalling py27-pycparser-2.10
->   Reinstalling py27-setuptools-2.0.1
        Upgrading libXrandr: 1.4.2 -> 1.4.2_2
        Reinstalling py27-argparse-1.2.1
        Upgrading py27-cffi: 0.8.1 -> 0.8.2
        Reinstalling py27-twistedCore-13.2.0
        Reinstalling py27-twistedLore-13.2.0
        Reinstalling py27-twistedNames-13.2.0
        Reinstalling py27-twistedNews-13.2.0
        Reinstalling py27-twistedPair-13.2.0
        Reinstalling py27-twistedRunner-13.2.0
        Reinstalling py27-twistedWeb-13.2.0
        Reinstalling py27-twistedWords-13.2.0
        Reinstalling python-2.7_1,2
        Reinstalling libGL-7.6.1_4
        Reinstalling libGLU-9.0.0
        Reinstalling py27-twistedConch-13.2.0
        Reinstalling py27-twistedMail-13.2.0
        Upgrading freeglut: 2.8.1 -> 2.8.1_2
        Reinstalling py27-twisted-13.2.0
        Upgrading tiff: 4.0.3 -> 4.0.3_1
        Upgrading libgd: 2.1.0_1,1 -> 2.1.0_3,1
        Reinstalling vnstat-1.11_5

The upgrade will require 4 MB more space

0 B to be downloaded
(two pointers added by me)

Edit: shorter list without the -f option:
Code:
root@casey:~ # pkg upgrade 
Updating repository catalogue
Upgrades have been requested for the following 59 packages:

        Upgrading boost-libs: 1.55.0 -> 1.55.0_1
        Upgrading ca_root_nss: 3.15.4 -> 3.16
        Upgrading cmake: 2.8.12.1_2 -> 2.8.12.1_4
        Upgrading curl: 7.35.0 -> 7.36.0
        Upgrading freetype2: 2.5.2 -> 2.5.3_2
        Upgrading gmp: 5.1.3_1 -> 5.1.3_2
        Upgrading libICE: 1.0.8,1 -> 1.0.8_2,1
        Upgrading libSM: 1.2.2,1 -> 1.2.2_2,1
        Upgrading libXau: 1.0.8 -> 1.0.8_2
        Upgrading libXdmcp: 1.1.1 -> 1.1.1_2
        Upgrading libiconv: 1.14_2 -> 1.14_3
        Upgrading libxml2: 2.8.0_3 -> 2.8.0_5
        Upgrading mpfr: 3.1.2_1 -> 3.1.2_2
        Upgrading openssl: 1.0.1_9 -> 1.0.1_11
        Upgrading pciids: 20140222 -> 20140402
        Upgrading perl5: 5.16.3_7 -> 5.16.3_9
->   Installing py27-setuptools27: 2.0.1
        Reinstalling py27-asn1-0.1.4_1,1 (direct dependency changed)
        Reinstalling py27-pycparser-2.10 (direct dependency changed)
        Reinstalling py27-zope.interface-3.8.0_1 (direct dependency changed)
        Upgrading sqlite3: 3.8.3.1 -> 3.8.4.2
        Upgrading xextproto: 7.2.1 -> 7.3.0
        Upgrading bitcoin-daemon: 0.8.6_1 -> 0.9.1
        Upgrading fontconfig: 2.11.0_1,1 -> 2.11.0_2,1
        Upgrading gcc47: 4.7.4.20140315 -> 4.7.4.20140419
        Installing p5-Net-SSLeay: 1.58_1
        Installing p5-Socket: 2.013
        Installing p5-IO-Socket-IP: 0.29
        Upgrading libpciaccess: 0.13.2 -> 0.13.2_2
        Upgrading libxcb: 1.9.3 -> 1.10_2
        Reinstalling py27-argparse-1.2.1 (direct dependency changed)
        Upgrading py27-cffi: 0.8.1 -> 0.8.2
        Reinstalling py27-twistedCore-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedLore-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedNames-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedNews-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedPair-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedRunner-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedWeb-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedWords-13.2.0 (direct dependency changed)
        Installing p5-IO-Socket-SSL: 1.981
        Upgrading libX11: 1.6.2,1 -> 1.6.2_2,1
        Upgrading libXext: 1.3.2,1 -> 1.3.2_2,1
        Upgrading libXfixes: 5.0.1 -> 5.0.1_2
        Upgrading libXi: 1.7.2,1 -> 1.7.2_2,1
        Upgrading libXrender: 0.9.8 -> 0.9.8_2
        Upgrading libXt: 1.1.4,1 -> 1.1.4_2,1
        Upgrading libXxf86vm: 1.1.3 -> 1.1.3_2
        Upgrading p5-Net-SMTP-SSL: 1.01_1 -> 1.01_2
        Reinstalling py27-twistedConch-13.2.0 (direct dependency changed)
        Reinstalling py27-twistedMail-13.2.0 (direct dependency changed)
        Upgrading git: 1.8.5.4_1 -> 1.9.2
        Upgrading libXdamage: 1.1.4 -> 1.1.4_2
        Upgrading libXmu: 1.1.2,1 -> 1.1.2_2,1
        Upgrading libXrandr: 1.4.2 -> 1.4.2_2
        Upgrading freeglut: 2.8.1 -> 2.8.1_2
        Reinstalling libGL-7.6.1_4 (needed shared library changed)
        Upgrading tiff: 4.0.3 -> 4.0.3_1
        Upgrading libgd: 2.1.0_1,1 -> 2.1.0_3,1

The upgrade will require 4 MB more space

0 B to be downloaded
(one pointer added by me)
Incidentally, the error is labeled as a warning without the -f option:
Code:
pkg: WARNING: locally installed py27-setuptools-2.0.1 conflicts on /usr/local/lib/python2.7/site-packages/setuptools/version.pyo with:
        - py27-setuptools27-2.0.1
 
Fixed!

Update
Got it working. I noticed that pkg was trying to install py27-setuptools-2.0.1 twice.

The solution was to run these two commands:
pkg delete -f py27-setuptools-2.0.1
pkg upgrade

I think I may try the -f option on the upgrade to undo my rm -r handy-work
 
Did you read /usr/ports/UPDATING entry 20140307 regarding "AFFECTS: users of devel/py-setuptools dependent ports"? There was a change in package names that required manual intervention which you figured out the hard way.
 
Back
Top