upgrading to a snapshot; what to do with ports tree?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

upgrading to a snapshot; what to do with ports tree?

Rudolf Sykora
Hello,

when I switch to a recent snapshot, I can also download ports.tar.gz
related to it.
Should I just first completely remove the old tree
(rm -rf /usr/ports), or should I keep it and untar the
ne ports.tar.gz over it?

(I guess the first, but...)

Thanks
Ruda

Reply | Threaded
Open this post in threaded view
|

Re: upgrading to a snapshot; what to do with ports tree?

Peter Nicolai Mathias Hansteen
On Thu, Aug 02, 2018 at 09:14:10AM +0200, Rudolf Sykora wrote:
 
> when I switch to a recent snapshot, I can also download ports.tar.gz
> related to it.

If you already have a ports tree, cvs up from a nearby mirror is likely faster.
I tend to use pretty much the commands you find at http://www.openbsd.org/anoncvs.html
with adjustments to use the most-local mirror (for me thats the eu one).
 
And of course for most ports or packages, pkg_add -u is probably all you need.
If you suspect your package information could be off in some way, pkg_check
is useful too.

- Peter

--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: upgrading to a snapshot; what to do with ports tree?

Stuart Henderson
In reply to this post by Rudolf Sykora
On 2018-08-02, Rudolf Sykora <[hidden email]> wrote:

> Hello,
>
> when I switch to a recent snapshot, I can also download ports.tar.gz
> related to it.
> Should I just first completely remove the old tree
> (rm -rf /usr/ports), or should I keep it and untar the
> ne ports.tar.gz over it?
>
> (I guess the first, but...)
>
> Thanks
> Ruda
>
>

Use cvs. See http://www.openbsd.org/anoncvs.html and note the "changing
the server" section if your existing one came from ports.tar.gz. No need to
remove the existing files.


Reply | Threaded
Open this post in threaded view
|

Re: upgrading to a snapshot; what to do with ports tree?

Stuart Henderson
On 2018/08/02 10:16, Rudolf Sykora wrote:

> > Use cvs.
>
> Ok. I just tried to follow the table at
> https://www.openbsd.org/faq/ports/ports.html
> under
> Fetching the ports tree
> where I understood the table in the sense to download the tar.
> (At that point I haven't realized that there seems to exist just
> one snapshot [not a series of them in time], so I wanted to have the ports
> tree just right for the snapshot. If we only consider the newest
> snapshot, I understand that using cvs and its -current branch is
> just nearly the same.)

I think it's fairly pointless to have a ports.tar.gz for -current.

People following current and using it for ports development are expected
to keep up with cvs anyway.

People not using it for ports development mostly don't need a ports
tree and are better served with snapshot packages instead. (The main
exception to this is if you need to use things from ports where we
aren't allowed to distribute packages so you need to build them yourself.)

There's no ports.tar.gz which can be guaranteed to be "just right" for
any given snapshot. They are produced separately.

> > No need to remove the existing files.
>
> No need to remove if you use cvs. Right?
> But if tar is used, then the removal is needed, no?
> Without it some old (say removed, no longer valid ports)
> would remain.

ports.tar.gz is just a tarred-up CVS checkout.

You can update it with CVS using the usual flags (-Pd), this will remove
old directories and add new ones as needed.

If you're downloading the whole ports.tar.gz tree again to unpack then yes
you will need to remove old files first, but I wouldn't recommend that.