how to update ports?

I feel like a newbie here,but google is getting worse and worse over the time in search results

in the past I use portsnap,but not anymore, so, running
git pull in
Code:
/usr/ports
returns:
Code:
fatal: not a git repository (or any parent up to mount point /usr)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

how to update /usr/ports ?

Thanks

Btw, the AI is making the humanity just dumb,google is a shi$# now
 
how to update /usr/ports ?
You can only do a git pull if it's actually a git repository. I'm assuming your current /usr/ports was previously populated by portsnap(8), this is NOT a git repository. So, delete everything in /usr/ports/ and do a git clone of the ports tree. (It has to be empty, you cannot clone over existing files).


You have to clone it first, then you can keep it updated with git pull.
 
You can only do a git pull if it's actually a git repository. I'm assuming your current /usr/ports was previously populated by portsnap(8), this is NOT a git repository. So, delete everything in /usr/ports/ and do a git clone of the ports tree. (It has to be empty, you cannot clone over existing files).


You have to clone it first, then you can keep it updated with git pull.

are the default ports from the instalation memstick,there is any diference?

and from handbook
git clone https://git.FreeBSD.org/ports.git /usr/ports

The switch
Code:
--depth 1
will install 15.1-RELEASE ports? (sorry for the newbie question)
 
If you have /usr/ports/distfiles and/or /usr/ports/packages that already holding some contents and are NOT dedicated filesystem or dataset, be sure to backup (or move) outside of /usr/ports before deleting contents of /usr/ports.

If not yet, I strongly recommend both /usr/ports/distfiles and /usr/ports/packages to be dedicated filesystem (for UFS) or datased (for ZFS).

Both are NOT parts of the ports repository itself (intentionally untracked).

I've experienced changes in repository type 2 times (first CVS to Subversion, and next Subversion to Git) and repository needed to be blanked before pulling new style of repository. And there are no assurance that repository is being Git forever (i.e., in case Git itself is abandoned and no longer supported).
 
are the default ports from the instalation memstick,there is any diference?

and from handbook
git clone https://git.FreeBSD.org/ports.git /usr/ports

The switch
Code:
--depth 1
will install 15.1-RELEASE ports? (sorry for the newbie question)
The Ports Distribution on the 15.1-Release media is 6 months old.
The Ports are being constantly updated and its very probable that you end up with a version conflict if you use the
6 months old Ports tree. or find that something is missing.
 
To simplify it for myself, I use gitup. It can be installed from packages. Then edit /usr/local/etc/gitup.conf. Usually you just have edit the release stanza which may still default to 13.something. After that, you can get ports by just running
Code:
 gitup ports
or
Code:
gitup quarterly
depending upon your preferences.
 
The Ports Distribution on the 15.1-Release media is 6 months old.
The Ports are being constantly updated and its very probable that you end up with a version conflict if you use the
6 months old Ports tree. or find that something is missing.

Thanks, that's the principal reason,keep an update ports tree,I'want to compile brave from ports,and is not in package repositories yet
 
So, late reaction but then again that never stopped me before.

Yah, FreeBSD has started using Git to control the "big three": the source tree (/usr/src), the ports collection (/usr/ports and last but certainly not least: the documentation project (/usr/doc). I actually wrote a guide about this process which - according to several other people - still seems to be quite a good read on the subject.

And this brings us to the next step: updating. I very much enjoy using ports-mgmt/portmaster to help me manage the installation process of the several ports and also to some extend the updates. But what about the ports collection itself?

I actually build some shell scripts of my own to cover all that, my Portmaster-assist project, still very much work in progress (and at this time it doesn't handle moved ports just yet) but everything else works like a charm: run refresh to update your ports collection using Git but also check for updated ports (also cross referncing all this to /usr/ports/UPDATING) and then you use update to, well.. update obviously ;) It includes a ignore option so that you can keep some ports out of the way for now. Of course it won't enforce this if other ports still have dependencies to meet (for example: I ignore LLVM, but sometimes PowerDNS relies on the newer version, so if you upgrade PDNS then LLVM also gets included; ignored or not).

Food for thought?
 
Back
Top