Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Apr 2016 12:31:06 -0400
From:      Michael Powell <>
Subject:   Re: Ports upgrade script
Message-ID:  <netpa3$arh$>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
JosC wrote:

> In een bericht van 16-4-2016 12:18:
>> Portsnap isn't compatible with svn.
> So I think I should revise the way I update my ports.
> What I did with my 9.3 BSD was the following script (which worked
> perfectly):
> !/bin/sh
> cd /local/user/etc
> svn update /usr/src
> svn update /usr/ports
> #
> cd /usr/ports
> make fetchindex
> portsdb -fu
> #
> #
> cd /usr/local/etc
> portupgrade -na
> #
> So this part I replaced now with:
> portsnap fetch update
> kind of lost how to continue now...

I use svn to pull and/or update /usr/src/. I use portsnap to manage 
/usr/ports and the old portupgrade for updates. This is what I do:

portsnap fetch update && portsdb -u && portversion | grep \<

If the indexes or dbases have been damaged it may just be easier to wipe 
everything under /usr/ports/ and pull a fresh tree, as per:

Procedure 4.1, so as to start over. From then the portsnap fetch update as 
above to keep it updated. As far as binary management utilizing pkg or 
freebsd-update I don't know anything about these, as I've never used either 
one, so I have no clue how these would interrelate. I've also never used 
portmaster either, but I suspect it is not a good idea to mix and match; 
(use one *or* the other).

I have seen instructions on how to repair damaged databases, just have never 
had to do it but I know it is possible.

I know under the /usr/src is a directory .svn. I've compared experience with 
someone who uses svn-lite and he says the following has never been necessary 
in his experience (but I've always had to do this):

cd /usr/src and then chflags -R noschg .svn in order for rm -rf the .svn 
folder to work without 'Operation not Permitted' error. This .svn directory 
is for svn internal housekeeping. You might want to look under /usr/ports/ 
and see if you have one there, and remove it as unneeded.

Since I've never used svn to pull my ports tree I have no idea if there is 
supposed to be a /usr/ports/.svn, or not. I also seem to recall something 
about the svn vs portsnap incompatibility being mentioned somewhere wrt to 
changes between 9.x to 10.x, but for the life of me can't recall where.

Also not recently the default version of Ruby (upon which portupgrade 
depends) has changed. There is an /usr/ports/UPDATING entry on this. IIRC it 
is the ruby22-bdb5-0.6.6_4 that portupgrade uses for managing its database.


Want to link to this message? Use this URL: <$arh$1>