# Portmaster trying to "upgrade" deleted ports



## Doublemint (Apr 9, 2014)

Background: The system has been installed for a few years. Started on 9.0-RELEASE and is currently 10.0-RELEASE. I believe I may have messed something up during the transition to pkgng which is causing a frustrating problem now.

Basically, ports that I have deleted some time ago are trying to be "upgraded" (i.e. reinstalled) when I run `portmaster -a`. Take for example devel/bison. It doesn't appear when I run `pkg info` or `portmaster -l`, but `portmaster -a` results in:


```
===>>> The following actions will be taken if you choose to proceed:
	Install devel/bison

===>>> Proceed? y/n [y]
```

It is quite annoying. I know I can get around it by being prompted for each port, but it's quite a hassle as there are 37 deleted ports doing the same thing.

Any help would be much appreciated.


----------



## SirDice (Apr 9, 2014)

Are you sure it's not needed as a build dependency?


----------



## Doublemint (Apr 9, 2014)

SirDice said:
			
		

> Are you sure it's not needed as a build dependency?



Well I guess it could be. I didn't think of that.

Would all the dependencies be removed after building though? As mentioned, there are a lot of these showing up, not just bison.


----------



## SirDice (Apr 9, 2014)

Are there any left-over old package registrations in /var/db/pkg/? It shouldn't use any of them because 10.0 lacks the tools for it but you never know.


----------



## Doublemint (Apr 9, 2014)

SirDice said:
			
		

> Are there any left-over old package registrations in /var/db/pkg/? It shouldn't use any of them because 10.0 lacks the tools for it but you never know.



There are, but if I manually remove them `portmaster` still wants to install them. Curiously though, they show up again in /var/db/pkg after running `portmaster` even though I've enabled pkgng in /etc/make.conf.

It's really starting to look like I just have a bunch of build dependencies. Things like bison, m4, ruby, etc. Silly me!


----------



## SirDice (Apr 9, 2014)

You don't have to enable PKGNG on 10.0, it's the default (it's also the only package system). I think portmaster(8) itself also creates similar directories in /var/db/pkg, that's why they may be there.


----------



## kpa (Apr 9, 2014)

There's a whole bunch of ports that are only needed when building ports. If you were using a package builder like ports-mgmt/poudriere you would never see those ports on the list of installed packages because they wouldn't be needed at run time anymore and wouldn't get installed in the first place.


----------



## SirDice (Apr 9, 2014)

Maybe it was previously done with the --delete-build-only switch of portmaster(8)? I'm not sure but a pkg-autoremove(8) may remove build dependencies too.


----------

