A simple question about pkg and portmaster

Hello, I'm upgrading my system, and I have packages installed by pkg and other for ports. I use pkg update and pkg upgrade for upgrading binary packages, but when I do portmaster -a for upgrading ports, show for upgrading packages that I have installed with pkg, portmaster upgrading binary packages installed by pkg?

ports-mgmt/portmaster is intended for user who want to compile the ports themselves. This allows to choose non-default options for each port. Finally a package is compiled as an input to the ports-mgmt/pkg system.

If some ports are installed via ports-mgmt/portmaster with non default options and others via ports-mgmt/pkg it does not need much fantasy to imagine that the depenencies might not match. If you do not need non default port options you can use packages. If you want or need to use ports for parts of the system it is best practice to do everything with ports.

I hope I have been able to answer your question at least a little bit.
A built port when installed always ends up as an installed package and there is no difference between packages that are installed via ports and the packages installed from a binary repository. In the current supported versions the package format is PKG, formerly known as PKGNG.
Thanks, but, if i have a mix system, binary packages and ports, and i want upgrade only the package installed by port, how i do it? Because, for example, xonotic is not in pkgng repository, only in ports, how upgrade for example this package?
A package is, quite simply, a pre-compiled port. As a matter of fact a port builds a package and the package gets installed. So once installed there is no difference.
-Snake-, chances are the reason portmaster wants to upgrade ports you've already installed from packages is that the package repository only gets updated a few times a week, while the ports tree is updated several times a day. So there will always be at least a few ports/packages installed on your system for which he version available in the ports tree is newer than the version available in the package repository.

Consider using ports-mgmt/synth to manage your ports and packages. It's a tool for creating a local, custom package repository, and lets you easily mix and match ports and packages without the two sources conflicting.