# PKGNG - portmaster disabled problem



## pphalen (Oct 30, 2012)

On two servers, I followed the instructions for updating to pkgng, with portmaster:

```
# portsnap fetch update
# make -C /usr/ports/ports-mgmt/portmaster config clean build deinstall install
# echo "WITH_PKGNG=yes" >> /etc/make.conf
# pkg2ng
```
Now, one machine updates with portmaster without complaint, but the other says:

```
"Package installation support cannot be used with pkgng yet, it will be disabled."
```
I reinstalled portmaster again, but that didn't help. Suggestions?

FreeBSD 9.0-RELEASE


----------



## SirDice (Oct 30, 2012)

Install ports-mgmt/portmaster again and make sure you enable PKGNGPATCH.


----------



## pphalen (Oct 30, 2012)

Yes, I've already tried twice
`# make -C /usr/ports/ports-mgmt/portmaster config clean build deinstall install`

and confirmed PKGNGPATCH box was checked. Same problem. And then attempting to run *pkg2ng* again complains of corrupted formats, since it uses pkg_info(1). So I'm still stuck.


----------



## break19 (Oct 30, 2012)

"Package installation support cannot be used with pkgng yet, it will be disabled." Means just what it says.. You cannot use portmaster to install -packages- only ports.


----------



## pphalen (Oct 30, 2012)

Thanks, but as I mentioned, one (identically configured) other machine doesn't issue that warning. So still a bit of a puzzle...


----------



## KdeBruin (Oct 31, 2012)

Did you by any change install any packages on the machine with the warning?


----------



## pphalen (Oct 31, 2012)

Portmaster installed ports, but I haven't manually installed any packages using the 'pkg' command. Is that what you mean?


----------



## tankist02 (Feb 15, 2013)

I also have the same problem with portmaster and pkgng.


----------



## dave (Mar 2, 2013)

Same


----------



## DutchDaemon (Mar 3, 2013)

The portmaster warning about packages should only come up if you're running it with the -P or -PP flag (or equivalent setting in /usr/local/etc/portmaster.rc, like using only packages for build dependencies, etc.).


----------



## kpa (Mar 3, 2013)

There's no reason to use the package options of ports-mgmt/portmaster with PKGNG, use pkg install etc. directly.


----------



## DutchDaemon (Mar 3, 2013)

Installing ports with portmaster while using binary packages for build-only dependencies (removing them right after installation) is a very nice thing to have. That's a regular option in portmaster.rc, and I hope to see it working again soon.


----------



## ObiektywNy (Aug 21, 2013)

I need some clarification. I used portmaster, and I am on a fresh 9.1-RELEASE, should I now  only use pkg install to install the ports or I can still use a string as `# portmaster /lang/php5` or is installation with `# cd /usr/ports/lang/php5/ && make install clean` also fine? I am not sure with installation way I can use and which I should not mix.


----------



## dave (Aug 21, 2013)

Get clear on the difference between packages and ports: http://www.freebsd.org/doc/en/books/handbook/ports.html

I suggest you use ports, and portmaster is a great utility for managing ports.  If you don't have it installed already, `# cd /usr/ports/ports-mgmt/portmaster && make install clean`. Also, drop the leading slash from your portmaster command: `# portmaster lang/php5`.

And make sure you read up on the options for portmaster: `# man portmaster`


----------



## Bucky (Sep 26, 2013)

*Fresh install of FBSD 9.1*

For a fresh install of FreeBSD 9.1 (since July 2013 and probably earlier), do NOT invoke the pkg command.  Do the fresh install like this:

Fresh install per usual, login/password, do minor housekeeping, then in this order:

Add 
	
	



```
WITH_PKGNG=yes
```
 to /etc/make.conf
`portsnap fetch extract`
`cd /usr/ports/ports-mgmt/pkg` (`make install clean`)
`cd /usr/ports/ports-mgmt/portmaster` (`make install clean`)
then use `pkg version` to show installed ports and `portmaster -L` to confirm the same thing.

If you simply type `pkg` instead of installing pkg from the ports collection as described above, it will install an earlier version of pkg which doesn't play nice with portmaster. On a fresh install you do NOT need to run pkg2ng, since there is no database to convert at that point.

I confirmed this behavior on a Virtualbox install a few minutes ago (using x32 architecture, but it is certainly also true for the x64 platform.)

Cheers!

PS - this may be needed for the upcoming 9.2 release as well, so do the ports collection install and avoid a headache.


----------



## morbit (Oct 31, 2013)

DutchDaemon said:
			
		

> Installing ports with portmaster while using binary packages for build-only dependencies (removing them right after installation) is a very nice thing to have. That's a regular option in portmaster.rc, and I hope to see it working again soon.



This somehow bite me after just reading announcement and finally taking the plunge.

http://lists.freebsd.org/pipermail/freebsd-pkg/2013-October/000107.html

Previously, I was waiting for packages to appear exactly because of this portmaster's feature.


----------



## gushi (May 4, 2014)

It's been a year.  Apparently no change?


----------



## dave (May 4, 2014)

gushi said:
			
		

> It's been a year.  Apparently no change?



Ditto.

http://forums.freebsd.org/viewtopic.php?f=5&t=46245


----------



## ghoti (May 7, 2015)

I don't have a solution to the problem, but in my case I got rid of the warning by removing `--packages-build` from my command line (or rather, `PM_PACKAGES_BUILD=pmp_build` from my portmaster.rc file).

It's not -P or -PP, but causes the same error when the port you're building has build dependencies for which you've already built packages.

Included here for posterity.


----------

