# pkg wants to be installed everytime



## InvaderZim (Dec 8, 2014)

Time to run updates on 9.2-RELEASE-p15 (which was updated from 8.1-RELEASE). So I say `portmaster graphics/ImageMagick`. It then checks all the dependencies. One of which is 
	
	



```
Install ports-mgmt/pkg
```

Running the installs fails, because 
	
	



```
===>  Checking if pkg already installed
===>  pkg-1.3.8_3 is already installed
  You may wish to ``make deinstall'' and install this port again
  by ``make reinstall'' to upgrade it properly.
  If you really wish to overwrite the old port of pkg
  without deleting it first, set the variable "FORCE_PKG_REGISTER"
  in your environment or the "make install" command line.
*** [check-already-installed] Error code 1
```
 Not the first time I've seen something like this, so I do `make clean deinstall reinstall -C /usr/ports/ports-mgmt/pkg` which works. So then back to `portmaster graphics/ImageMagick` and everything is repeated ad infinitum. Why does pkg need to be installed every time?


----------



## SirDice (Dec 9, 2014)

It doesn't. But I have a feeling your system still has a combination of old and new style packages. Did you ever run pkg2ng? Not sure if it's needed for this version but add 
	
	



```
WITH_PKGNG=YES
```
 to /etc/make.conf to force the usage of pkg(8) (and make sure you're converted correctly).


----------



## InvaderZim (Dec 9, 2014)

I'm sure it shouldn't, but it does. Every time. And the system does have a number of installs via the old mechanism.

We did run pkg2ng, and we added 
	
	



```
WITH_PKGNG=YES
```
to /etc/make.conf, but alas to no avail.

Did get a number of 
	
	



```
pkg: sqlite error while executing ROLLBACK TRANSACTION
```
 messages. But there was nothing to roll back, nor were there any transactions active.


----------



## ikbendeman (Dec 11, 2014)

I've had similar issues on every install, including my current AMD64 10.1 install. For example, I just installed emulators/wine-gecko and before it installed that it, once again, (re)installed ports-mgmt/pkg. I've never figured out why.


----------

