# Interaction of ports and packages? shift to ports only?



## forkandwait (May 13, 2012)

Warning:  this post may be slightly incoherent due to my newbie-ness.

What happens when you install a combination of ports and packages and then update via ports?

My story: I tried to delete all non-base system ports and packages and rebuild from port alone.  I had to install xorg via packages because I was getting errors I couldn't understand trying to do it with ports and I needed a web browser to ask questions on this forum 

I would like to run a ports only system, and I would like to shift it over without deleting and reinstalling everything, is that possible?

Also, sometimes I get errors in the port build when I make, but if I go install a dependency by itself, the port I was trying to install  works fine.  I wonder if this is a bug in the specific port or a problem introduced by reverting to base only?


----------



## bbzz (May 13, 2012)

A package is a compiled port. No difference between the two once installed. Port system allows you to configure different options and optimizations you need. A package which can be downloaded is always compiled with default options only.

Be specific about other errors you get when compiling.


----------



## UNIXgod (May 13, 2012)

The ports system can be simplified based upon the breaking down the sum of its parts. Reading the handbook entry will get you started. There is also a man page for ports() as well.

You can update your port Makefile "definitions" with portsnap().

You can see which ports you have installed that have newer versions with pkg_version()

There are a couple tools available in the ports tree to help with automation of port upgrades. Two tools off the top of my head are ports-mgmt/portmasterand ports-mgmt/portupgrade.

There is a file everyone reads after running portsnap located at /usr/ports/UPDATING. It will provide information on upgrading specific ports that need special attention and can't be upgraded the traditional way.

Without seeing the error I can't help you. I see compile warnings all the time. These are usually superfluous and don't effect the build of the binary.


----------



## forkandwait (May 13, 2012)

bbzz said:
			
		

> A package is a compiled port. No difference between the two once installed.



Hypothetical question.  If I go through *pkg_version*, find which packages have a port upgrade available, do each one of those, will I then be "package free"?  At that point, whenever I run portupgrade (or whichever), will I only be pulling in ports?


----------



## DutchDaemon (May 13, 2012)

Yes. Once installed, there is absolutely no difference between packages and ports. So when you upgrade something that was installed using a package with a port, the earth will still rotate.


----------

