Updating the ports collection

Updating the ports collection

This section shows you how I updated my ports collection.  I’ll assume you have
already installed cvsup.

If you need just one port
refreshed, try reading Installing a port without
installing the ports
.

Why update the ports?

I was trying to make Midnight Commander.  But it wasn’t working.  
Here’s the message I was getting:

[root@ns:/usr/ports/misc/mc] # make clean
Cleaning for mc-4.1.35
[root@ns:/usr/ports/misc/mc] # make
mc-4.1.35 is marked as broken: mountlist.c.

I was told that 4.1.35 was not the latest version and that I should get 4.5.1.  
CVSup provides an easy way to update these ports.

The template

I started with /usr/share/examples/cvsup/ports-supfile.  I copied this
file to /usr/home/ports-supfile and then modified it to match my
requirements.  Here is the change I made:

*default host=cvsup.au.FreeBSD.org

I changed my server to one near me.

NOTE: Don’t worry about releases/version when cvsup’ing your ports.  There is only
one version of the Ports collection.  All versions of FreeBSD use the same ports
collection.  Therefore, when updating your ports use this tag:

tag=.

Different needs – different ports

The stock example file will give you all of the ports.  But I didn’t want that.
 So I also commented out the "ports-all" line and uncommented the
"ports-misc" line.  Actually, when I do this update, I often modify the
file according to my needs at the time.

You should not comment out ports-base.  See
When cvsup’ing your ports, remember the base distribution
for what might happen if you do.

I’m thinking about using one file for my regular port updates (every day) and another
file for the give-them-to-me-NOW occasions which so often occur.  With this
approach, I can keep my regular ports refreshed and ready to upgrade but still be able to
cvsup specific ports collections as and when needed.

If you need just one port refreshed, try reading Installing
a port without installing the ports
.

Running

This is so easy, it’s silly.

cvsup -P m ports-supfile

Actually, can get away with just:

cvsup ports-supfile

Try that and see if it works.  I had to use the first example because of a
firewall issue. You may be able to get away with the second example.

12 thoughts on “Updating the ports collection”

    1. And your comments aren’t much help either.

      In what area did you find it lacking? What information were you seeking which it did not provide? Was the information provided inaccurate?

      I can’t fix it if you don’t tell me what’s broke.

    2. Anonymous Coward

      It would be good to have an example of what to do when you have already installed a port and a new version becomes available.

      Like when you use the pkg_version -v command.

    3. At the top of this article, there is a link to the effect of "if you want to just install a single port, try this…". The linked solution details installing a port without having the ports skeleton installed.

      If you_do_ have the ports skeleton installed, but just want to update a single port. Here’s an easy way to do it:

      # as root

      # (Assume cvsup server is defined in ports-supfile and the
      # file otherwise in it’s default state).
      #
      # -i is a filter pattern, starting with "ports"
      # -g = no GUI

      cvsup -i ports/shells/bash2 -g /usr/share/exapmles/cvsup/ports-supfile

      # Thanks! -mark

    4. Thanks a lot
      i have followed what it said in the article; however, when i try to run cvsup, it gives me

      "Cannot get IP address of my own host — is its hostname correct?"

      What can i do ??
      Thanks in advanced !!!!

    5. Hi,

      I dont know if you want to add this to your paper or not.

      I dont run a GUI so when i update I run:

      cvsup -g -L 2 ports-supfile -h mirrored cvsup site

      i use the -h because it overides the default host name in the supfile and I’m Lazy. 😛

      the -g disables the grafphical user interface (YAAY) and the -L 2 provides a more indepth verbose mode.

      -enjoy

    6. you used this command line:

      cvsup -P m ports-supfile

      what does the "m" character mean? I can’t find it mentioned in the man or help on cvsup?

Leave a Comment

Scroll to Top