Syncing up the ports tree on a fresh install

Last week I did a fresh install of 10.3 release, using the dvd image, which installs /usr/ports and /usr/ports. I want to use svn to keep these up to date.

My question is how to get it established to svn that the existing trees are a fresh install from the release .iso dvd. Is this a simple matter of running svn checkou and svn update?
 
If you already have a ports tree in /usr/ports, only the svn update is needed. Like so:
# cd /usr/ports
# svn up
HTH
 
That's not going to work because the ports tree extracted from the tarball lacks the SVN metadata (which gives SVN the crucial information of what state the checked out copy is in). Also, SVN is not in the base system as svn but svnlite. What you should do is move away the ports tree that can't be updated with SVN and fetch a completely new one.

Code:
mv /usr/ports /usr/ports.old
svnlite co https://svn.freebsd.org/ports/head /usr/ports
 
Dear Oldrancher,
the only drawback is that svnlite(1) or devel/subversion do not update /usr/ports/INDEX-10 which is used by many tools for the package managemant. But this can be either generated by make index in /usr/ports. For it takes a lot of time it is simpler just to fetch it by make fetchindex in /usr/ports.

I write this just because it took me some time to find that out o_O.
 
At this point I'm completely confused. Yes, I know that I can recreate a fresh /usr/ports tree by renaming the current tree and using subversion to checkout a fresh copy.
I have installed subversion on the system using pkg. I have run svn checkout and svn update and have a /usr/ports/INDEX-10 file as a result. Question is whether doing that cobbled up the ports at all.
 
No, it's fine. None of that affects the package database, which keeps track of ports that are installed.
 
And might I add, since the ports tree is easy to fetch from a remote server, and useless if you're not online anyway, you can exclude it from your backup scheme if you wish. Those thousands of small files eat up a lot of time during a backup.
 
No, it's fine. None of that affects the package database, which keeps track of ports that are installed.
Dear wblock@, I am following https://svn.freebsd.org/ports/head/ which has no INDEX-10. At least I think so. The information of the portstree is
Code:
# svnlite info
Path: .
Working Copy Root Path: /usr/local/poudriere/ports/local
URL: https://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 414024
Node Kind: directory
Schedule: normal
Last Changed Author: olivierd
Last Changed Rev: 414024
Last Changed Date: 2016-04-25 19:01:41 +0200 (Mo, 25 Apr 2016)
and
Code:
# svnlite status
?       INDEX-10
Is there anything I can do to get the index file, too? As far as I remember I found the method using make fetchindex somewhere in the forum.
 
I have a ports tree without index, and didn't find any issues. Is this really used by anything other than make search and those pretty-print targets?
What you should do is move away the ports tree that can't be updated with SVN and fetch a completely new one.
And why not just delete it? This would just be a backup of an old state, which you could get any time again using the -r flag of subversion, so I don't see much sense in keeping it.
 
I have a ports tree without index, and didn't find any issues. Is this really used by anything other than make search and those pretty-print targets?
I think it is required for example pkg version or psearch. At least psearch is really nice. Is there a method without the index file to see which the installed packages are up to date and which are to be updated? Of course before build?
 
I have a ports tree without index, and didn't find any issues. Is this really used by anything other than make search and those pretty-print targets?

And why not just delete it? This would just be a backup of an old state, which you could get any time again using the -r flag of subversion, so I don't see much sense in keeping it.

It's faster to rename than wait for the complete deletion, you can delete the old one then when the system is lightly loaded.
 
Rereading... okay, yes, the index file is not part of the repo because it changes all the time. The number is the major version number of FreeBSD that is running.
 
After getting/updating the tree with svn(1)/svnlite(1):
Code:
cd /usr/ports
make index

This will create the necessary INDEX-* files based on the versions you actually have in your tree.
 
Back
Top