Solved Portmaster: Unattended installation of Vim

Hi

I am new to FreeBSD and I have a fresh installation of it in front of me and to start editing config files before installing anything else I wanted to install Vim. But after hitting <OK> for the 1.000 time (at least it felt like 1.000), I just aborted it and tried out some flags to have an unattended installation, because portmaster want to install a lot of stuff, like Python and Bash and like other 1.000 programs.

I tried this command:

portmaster -y --no-confirm editors/vim

But it keeps asking me stuff and I have to hit Enter a lot.

Thanks a lot for your help. I really appreciate it, because it can be very hard if a newbie asks questions. :) And I am sorry, if it was too easy too solve, but I couldn't find anyone in the IRC channels who could help me :(
 
You should rather use pkg(8) to install 3rd party software, then you'll only need to hit <Enter> once ;)
pkg install vim
The amount of depencies that are pulled can be huge when you install the first pieces of software, but the more software you install, the more dependencies will be there already.
Anyway, they must be installed to run the software you want.

I'd stick with with pkg(8) (prebuild packages) instead of ports(7) (must be build), as long as you don't need du build software with different defaults as in the prebuild packages.
Note that pkg/ports shouldn't be mixed.

If you want to learn how to use ports, I'd personally not use portmaster(8) to start with, but rather build them using make. You'll understand better how it works imo.
Using the Ports Collection
You can configure a port and it's dependencies up front and then let it build without asking questions during the process.
% cd /usr/ports/editors/vim
# make config-recursive
# make install
But as said, if you don't change a single option, you should use pkg.
 
It's probably asking whether you want to keep or delete previous packages. You can use the "-D" flag to keep earlier packages or "-d" to delete them.
 
If it is the -d flag mentioned by lasuit, you can fix that in /usr/local/etc/portmaster.rc. (There is a sample file, in /usr/local/etc/, portmaster.rc.sample, just copy it to portmaster.rc. Uncomment the line
# ALWAYS_SCRUB_DISTFILES=dopt
. That will get rid of that question. As for the other, as ljboiler wrote, there's the -G flag. As long as you know you want default options, this is fine. You can put that option in portmaster.rc as well, by uncommenting
PM_NO_MAKE_CONFIG=Gopt

The man page describes it as prevent make config which may not be clear to some people, but that's what it does, it automatically chooses defaults.
 
You should rather use pkg(8) to install 3rd party software, then you'll only need to hit <Enter> once ;)
pkg install vim
...
But as said, if you don't change a single option, you should use pkg.

I will use pkg because I don't know any software I install with special flags (yet). And if there will be one, I can use portmaster without any problems only for this one specific software (claim people in different IRC channels).

But for now I've removed ports completely doing what vermaden recommends in this reddit thread. But I don't even know if this is the right and clean way to do this on FreeBSD?

But thanks a lot to all who helped me :)
 
The easiest is to simply do pkg upgrade -f. This will reinstall everything, replacing it all with the official packages.
 
Back
Top