Upgrading packages - portupgrade confusion

Kaya Saman kayasaman at gmail.com
Sun Sep 12 15:46:58 UTC 2010


Thanks Warren and Michael! :-)

On Sun, 12 Sep 2010, Kaya Saman wrote:

> The thing I don't quite understand though is that if the ports tree 
> gets refreshed, do the packages get upgraded or will I need to rebuild 
> them??

The ports tree is just build instructions, so updating it doesn't update
any installed applications.  It does let you use a program to see which
installed applications need to be updated, like pkg_version or
portversion.

Here's a document I've been working on lately about upgrading ports.
I'm not sure it's really there yet, but it covers the basics:

   http://www.wonkity.com/~wblock/docs/html/portupgrade.html


Yep I kinda figured that before even posting and also I knew the 
difference between packages built by pkg_add and compiling fresh from 
ports since I've done a few BSD builds now but the really iffy thing was 
a: communication - which let me down not explaining myself properly and 
b: confusion of how to update

On 09/12/2010 05:36 PM, Michael Powell wrote:
> [...]
> Yes. A package is just a port that someone has compiled into a pre-built
> binary package for use with pkg_add. These binary packages are placed on ftp
> servers where pkg_add may download from and install.
>
> A port is just you doing the compiling locally yourself using the ports
> system. The installed result is the same, except for one thing. When a
> package is built some build options may have been selected as defaults while
> others were excluded. When you build the port locally you have complete
> control over all options.
>
>    

Ditto :-)

>> "portupgrade -a" or "portmanager -u" depending on what application you
>> are using. Switching between multiple port maintenance applications is
>> not the worse thing you could do; however, I would not recommend it as
>> an everyday occurrence.
>>
>>
>> Ok so "portupgrade -a" upgrades all ports according to the manual.
>>
>>      
> [snip]
>
>    
>> Ok, so if I understand correctly now is that the csup command refreshes
>> the ports tree while portupgrade upgrades the actual port itself....
>>      
> Update the ports tree first! csup -L 2 ports<- this file "ports" is a
> supfile. An example of a supfile was included in a previous mail. More
> detailed info in the Handbook.
>    

This clarifies, I can't believe what's wrong with me today as I seem to 
not be thinking :-(

I picked this up the first time round on a really good production build 
that I made and now I lost all that knowledge.... oh well working with 
MS can do that to you I guess??

>
>    
> [...]
> Another tip: Whenever there are situations which can get sticky most of the
> time notes are placed into a file containing instructions on how to deal
> with the problem. Get into the habit of always reading the UPDATING file
> located in /usr/ports so you will know about these *before* updating.
>
> [snip]
>
>    
This is really great advise as I'm kinda in the process of developing 
documentation myself similar to Warren:

http://wiki.optiplex-networks.com/xwiki/bin/view/FreeBSD/

Luckily I build all my systems in jails so is easily managed and doesn't 
blow up the whole system, however I do share the ports tree throughout 
all jails and the base install meaning that things get simplified 
although it can have its own problems such as version inconsistencies etc...

{{PS. this is also due to the fact that I only one available production 
system and can't afford to get more although soon I hope to one day}}

Thanks so much guys and sorry for being so noobish these last 2 days, 
just sorry you all had to put up with it!! :-)

Anyway best regards to all and hopefully mail along side you guys 
helping out others some sunny day in the future :-D


Kaya


More information about the freebsd-questions mailing list