When cvsup’ing your ports, remember the base distribution

When cvsup’ing your ports, remember the base distribution

I cvsup my ports on a regular basis.  
However, when I recently tried to upgrade to OpenSSH 1.2.1, I
encountered an error.  This article shows what I did wrong.

The example problem

I was about to upgrade to OpenSSH 1.2.1 from 1.2.0.  So I first did a
pkg_delete OpenSSH1.2.0 to remove the old port.  Then I, because I had the entire ports tree, I did this:

# make install
===> Installing for OpenSSH-1.2.1
Error: category ipv6 not in list of valid categories.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

I looked at the Makefile and found this line:

CATEGORIES=     security net ipv6

My temporary solution was to remove ipv6 from the line.  The next
section shows the permanent solution.

The solution

Here is what I should have done instead of removing ipv6 from the
makefile.

This problem occurred because /usr/ports/Mk was out of sync with
the rest of my ports.  The file /usr/ports/Mk/bsd.port.mk contains a list
of the valid categories.  The latest version of the OpenSSH port needed a new
category, which didn’t exist on my box.  My version was out of date.  Here’s
what the updated version looked like:

VALID_CATEGORIES+= afterstep archivers astro audio benchmarks \
        biology cad chinese comms converters databases deskutils \
        devel editors elisp emulators ftp games german gnome \
        graphics ipv6 irc japanese java kde korean lang \
        mail math mbone misc net news \
        offix palm perl5 plan9 print python russian \
        security shells sysutils \
        tcl76 tcl80 tcl81 tcl82 tcl83 textproc \
        tk42 tk80 tk82 tk83 tkstep80 \
        vietnamese windowmaker www \
        x11 x11-clocks x11-fm x11-fonts x11-servers x11-toolkits \
        x11-wm

I checked my ports-supfile.  I don’t use the ports-all
collection.  Instead, I only only those ports which are imortant to me.  
Unfortunately, I didn’t know that ports-base one collection I
should alway update.  It was commented out.

I enabled the ports-base collection and tried another
cvsup:

cvsup -P m ports-supfile

During this cvup, I noticed that the Mk collection was updated.  To test that all
was well, I went back to the OpenSSH directory and added ipv6 back into the
Makefile.  Then I did the following:

make deinstall
make
make install    

And this time OpenSSH 1.2.1 installed just fine, thank you.

The moral of the story

If you are updating your ports and not using ports-all,
remember to include ports-base.

Leave a Comment

Scroll to Top