Using Quarterly Ports Branches

Mathieu Arnold mat at FreeBSD.org
Fri Mar 3 10:09:20 UTC 2017


Le 03/03/2017 à 05:01, Chris Wells a écrit :
> A few questions: If I switch from HEAD to a quarterly ports branch,
> should I "rm -r /usr/ports/*" before checking out the quarterly branch
> from SVN? If so, should I do the same every time I migrate to a newer
> branch (e.g., moving from 2017Q1 to 2017Q2)? I believe it makes sense
> when reverting to an older branch like HEAD to quarterly, but I'm
> hoping it's unnecessary when moving forward. Any other directories
> that should be cleaned for a first-time change to quarterly ports or
> subsequent quarterly migrations?

Mmm, if you are using svn, I do not think you ever need to remove
/usr/ports:

$ svn co https://svn.freebsd.org/ports/head ports
[blah]
$ cd ports
$ svn info|grep URL
URL : https://svn.freebsd.org/ports/head
Relative URL: ^/head
$ svn switch ^/branches/2016Q4
[blah]
$ svn info|grep URL
URL : https://svn.freebsd.org/ports/branches/2016Q4
Relative URL: ^/branches/2016Q4
$ svn switch ^/branches/2017Q1
[blah]
$ svn info|grep URL
URL : https://svn.freebsd.org/ports/branches/2017Q1
Relative URL: ^/branches/2017Q1

For svn switch to really work, you do have to make sure you did not
change files in the ports tree.

> Would it be possible to "simply" create a symlink at
> https://svn.freebsd.org/ports/branches/quarterly that always points to
> whatever the current quarterly branch is? That way, everyone who wants
> to use quarterly packages/ports wouldn't have to worry about
> constantly switching the ports branch on every system they manage. A
> side benefit would be that packages and ports can share the
> terminology and meaning for their quarterly branch. Bonus points:
> change pkg and ports to have a CURRENT symlink pointed to HEAD and a
> STABLE symlink pointed to the latest quarterly branch so the names are
> more in sync with the base system's branch names.

Currently, all our tools working automatically with the quarterly
branches do this before any run:

latest_branch=$(svn ls https://svn.freebsd.org/ports/branches/|sed -ne
'/^2.*Q./s|/$||p'|tail -1)

All you'd need to do before running svn update would be to run:

svn switch ^/branches/$(svn ls
https://svn.freebsd.org/ports/branches/|sed -ne '/^2.*Q./s|/$||p'|tail -1)

and it would automagically switch to the new branch when a new branch
happens.

> If the symlink would work and easy enough to manage, it would be a
> great portsnap default in the base system to match pkg. The icing on
> the cake would be a persistent local setting to tell portsnap what
> branch to use so the commands to fetch/update the ports tree are
> consistent whether using HEAD or a branch.

The problems with symbolic links, is that they do not work on all
filesystems.


-- 
Mathieu Arnold


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170303/f535c510/attachment.sig>


More information about the freebsd-ports mailing list