# port & package conflict



## trybeingarun (Dec 23, 2009)

Hi all,
I am new to bsd and just now i had set up my PC. I have a doubt reg software installation. I had installed KDE4.3.1 from the fbsd 8.0 installation dvd and the ports tree right now has 4.3.3. How should I migrate to kde 4.3.3 version? Should I delete the package and install it via ports?


----------



## Purple_Q (Dec 23, 2009)

Is this of any use?
http://freebsd.kde.org/instructions.php

I prefer to stick with just one method of installing all of my software (ports). That aside, and I admit I lack the experience yet with FreeBSD that some of the fine folks here have, I myself would run 
	
	



```
pkg_info |less
```
to identify the pertinent packages, then use 
	
	



```
pkg_delete *exact package name here*
```
. Finally, then, make sure your copy of the ports tree is up to date (I prefer portsnap), then

```
cd /usr/ports/x11/kde4
make install clean
```

After all is done, you're off.
Like I said though, if that link above doesn't do it, you might wait a bit longer and perhaps someone here has a more efficient way.
  --Q


----------



## phoenix (Dec 23, 2009)

Don't delete the installed packages.

Just update the ports tree:  `# portsnap fetch update`

Then install portmaster: `# cd /usr/ports/ports-mgmt/portmaster``# make install clean`

Then use portmaster to upgrade the KDE apps: `# portmaster 'kde*'`

Portmaster will figure out the correct order to upgrade things, and will do the work for you.

Be sure to read /usr/ports/UPDATING for any section relating to KDE4, in case there are specific requirements or ordering needed.


----------



## zeiz (Dec 23, 2009)

Ports have latest version, packages are behind... but I like packages if they are available 
I use `portupgrade` (but probably `portmaster` has similar usage) so I'd type:

```
# setenv PACKAGESITE [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/[/url]
# portupgrade -aP
```
It will upgrade from packages everything that is available of the same version as in ports (fast) or use ports (takes a while...)

IMHO it's OK to mix upgates from ports and packages, it's allowed on FreeBSD


----------



## phoenix (Dec 23, 2009)

Portmaster 2.14 and newer supports --packages (-P) and --packages-only (-PP), along with some "use packages for build dependencies only" options.


----------



## Erratus (Dec 23, 2009)

phoenix said:
			
		

> Portmaster 2.14 and newer supports --packages (-P) and --packages-only (-PP), along with some "use packages for build dependencies only" options.


Hi, 

do I get this right? I can first install a package and portmaster converts them to ports when being updated? Or does an updated package will stay a package?
This kind of conversion would be of great help if true, as I'm blocked now building xorg (compiling gobject-introspection quits with error).
My intention is to build everything with ports as I did make buildkernel and make buildworld. And I thought to go for ports means not to mix ports and packages? 

Can I also install a package of a port that does not compile right now i.e. gobject-introspection and continue building xorg after that?

Please help me getting my thoughts sorted.


----------



## trybeingarun (Dec 24, 2009)

Hi all,
I did 

portupdate "*kde*"

which failed while downloading sqlite package. I will try rest of ur solutions and update the status.


----------



## trybeingarun (Dec 24, 2009)

@zeiz

Hmmm. All this time I thought it is really bad to mix up packages and ports!!


----------



## trybeingarun (Dec 24, 2009)

*Correction* - i meant portupgrade


----------



## DutchDaemon (Dec 24, 2009)

Mixing packages and ports can be done (to portupgrade/portmaster, they look and act the same), but it is my observation that running e.g. `portupgrade -aP` for any period of time will have you running a ports-only system in a very short time, simply because packages are always behind ports, so the -P flag ("use a port, unless there's a package of the same version") will almost always lead to a port being used. Might as well just use ports then, unless you need to get something installed _pronto_.


----------



## zeiz (Dec 25, 2009)

Exactly and that's the goal: to have everything latest but step by step not spending days and nights to do all at once and then wake up next day to see newer versions in ports again 
If I'm not mistaken from ports (source) we are compliling...same packages. Sometimes port version is exactly the same as its package version on ftp. The only difference that packages was built using default options but by building from port we can tweak options...if we know what we are doing and what for 
What is an advantage to build xorg from ports if almost everything there is the same as in packages for already a year or so?
A sample: `# portupgrade -NRP xorg` will install xorg mostly from packages but libxcb and xcb-proto from ports since they bumped recently.


----------



## DutchDaemon (Dec 25, 2009)

Well, I'm running 605 ports on my laptop, and I'm most certainly not upgrading every single day. I do get a new ports tree every day, and I run pkg_version every day, but the rate at which a newer port shows up is certainly not breathtaking. Sometimes several days go by without the need to upgrade a single thing, and sometimes it's suddenly 10 gstreamer ports. All in all I don't find keeping up with ports a chore at all, so long as you don't let it stack up for weeks. In that scenario, portupgrade -P is useless. If you decide to upgrade once a month or even less frequently, portupgrade -P will probably save you some compile time because some ports will have been made into packages by then.


----------



## trybeingarun (Dec 25, 2009)

Thanks guys. I used 
	
	



```
portupgrade -aP
```
 to solve my problem.


----------

