Rebuilding all ports with portmaster Error

My system: Lenovo Ideapad 310. CPU Intel i5-6200U
I have just installed FreeBSD 11.1-RELEASE-p1 amd64

My directory:
Makefile    distinfo    files    pkg-descr
Being a Windows user all the while, thought to look at FreeBSD and to learn more about computers and whatnot.

Following the steps from Thread 51210

1. portmaster --list-origins > ~/installed-port-list

-/installed-port-list: No such file or directory

2. Update the ports tree

#portsnap update
Ports tree is already up to date

3. portmaster -ty --clean-distfiles
===>>> Gathering distinfo list for all ports
               (This will take several minutes)

make: "/usr/ports/Mk/Uses/" line 404: Cannot open /usr/ports/lang/python/Makefile.version
make: Fatal error encountered -- cannot continue
make: "/usr/ports/Mk/Uses/" line 404: Cannot open /usr/ports/lang/python/Makefile.version
make: Fatal error encountered -- cannot continue

I CTRL-C to exit.

I did a pkg install vlc and a whole bunch of, er, whatnot, came out and so I thought I will try to rebuild the ports.

Am I doing correct or had I just step off a cliff?
First of all: why would you want to rebuild all your ports in the first place? That's a pretty hefty action to take, one which is usually not required, but depending on the situation of course.

When you issue the first portmaster command, what user account are you using? Does that account even have a home directory? What happens if you use, for example, ls ~ or echo ~?

Updating the ports tree can only be done after you downloaded the new updates, so: # portsnap fetch extract (see also portsnap(8), so on the commandline itself use the command man portsnap to read up on how to use that specific command).

It's also important to understand that there's a major difference between installing binary packages (done with the pkg-install(8) command) and building your own own ports (the classic # make install clean in the port directory itself). Under normal circumstances it's better not to mix these two ways of working.

So if you use binary packages then don't bother with the ports collection, and vice versa. I think this post gives a good explanation why it is bad to mix those two.

But yeah, let's start with the basics: what are you trying to achieve here?
You can also, if you want, search for portmaster discussion between myself and others, I went through the same as you. Those posts would be 2 years back.

Here is one such example: Thread 53886

You will also find example of discussion where I ran into library errors, etc. When new to FreeBSD rebuilding port(s) with Portmaster can be a bit daunting for a person new to FreeBSD, and even more so if you come from a Windows background and have no *nix experience. Hang in there, help us help you, learn from your boo boos and trust me, the disciplines of FreeBSD will bring you much joy later.

Gotta run, can chime in later.
As a new user I suggest you stick to using packages for the time being. At least until you are more familiar with installing and configuring things.

What am I trying to achieve....

What I did was, I just installed vlc, errr...I forgot how though but it took quite a long time to install. Then I
pkg updating
and I got the following whatnots:-

AFFECTS: users of multimedia/ffmpeg
AUTHOR: riggs@Freebsd.ord

ffmpeg have been updated to the latest version from the 2.7 branch.
If you are using binary pkg, 'pkg upgrade' will do the right thing.
Users of portmaster/portupgrade must rebuild all ports that depend on it.

Portmaster users:
portmaster -w -r ffmpeg
Portupgrade users:
portupgrade -fr multimedia/ffmpeg

So I did a
portmaster -w -r ffmpeg
, and after a while, did another
pkg updating
but still have the same message. I thought that I needed to rebuild the port tree to remove the above message as I have already did the portmaster -w -r ffmpeg. So rebuild the ports, thought I and here I am.

read through your tread, don't understand half of it, but have bookmarked it to reread later and hopefully will understand more. Thank you.


Ok, do I remove/uninstall the whole portmaster thinggy? What about VLC program and the XORG that I have just install? Remove them and reinstall using pkg? As in
pkg install vlc
pkg install xorg
pkg install x11
. Is there a list of what is available that I can go to?
pkg delete -a --all vlc
towards the end it pop a message pkg: cannot delete pkg itself without force flag don't understand that message.

From pkg-delete(8),
[B]pkg[/B] [B]delete[/B] avoids deleting itself unless named specifically on the com-
mand line. So, for instance, [B]pkg[/B] [B]delete[/B] [B]-a[/B] will delete all packages
except for the [URL='']pkg(8)[/URL] package. To force all packages to be removed with-
out exception, use [B]pkg[/B] [B]delete[/B] [B]-fa[/B].

Don't understand. So it will delete vlc program except for the pkg(8) package. I guess my next question is what is pkg(8) package?

In Windows to install just click vlc.exe and it will auto install. To uninstall, uninstall vlc and done. So I don't quite grasp what pkg-delete(8) is trying to say.... pkg deleting avoids deleting itself unless named specifically .........

Does pkg(8) package include vlc and something else?
Don't understand. So it will delete vlc program except for the pkg(8) package. I guess my next question is what is pkg(8) package?
These things get explained in the FreeBSD handbook.

But in short: pkg is FreeBSD's package manager. So it takes care of installing and removing software from your system. And a package is basically what makes up for that software. In the end all software gets installed through means of a package.
I have just installed FreeBSD 11.1-RELEASE-p1 amd64

You've just built your system and have begun to install 3rd party programs. There is no point I see in rebuilding what ports you've installed up to this point.

Do yourself a favor and read the Handbook.

I do have a Beginners Tutorial you may find of some use in setting up your system and security files. It uses ports and portmaster, however, you would do well to follow the advise of Sir Dice and stick with binary packages at this point IMO.
Thank you SirDice and too true :)

Well yes but my problem is that I have a users' mindset while most of you, I believe, have a programmers'/coders' mindset. So the FreeBSD handbook. For example:-

FreeBSD Handbook 4.2
A FreeBSD [I]port[/I] is a collection of files designed to automate the process of compiling an application from source code. The files that comprise a port contain all the necessary information to automatically download, extract, patch, compile, and install the application.

From this sentence, my understanding is that A FreeBSD port but require to be compiled upon installation, hence, make install clean.
Source code = human readable code before compiling. (Am looking at Python programming)
Binary code is a code that already been compiled (presumably using the same Source code as that of a FreeBSD port) and ready for deployment but uses the pkg tool(= vlc.exe) instead.

So I don't see the difference between the two as both uses the same source code, and I have to read that paragraph a few times too. That's what I mean about the difference in mindset.

I can read the Handbook until the cows come home and will not be able to understand the ins and outs of it without somebody to bounce of what I have read so I hope you guys can bear with me even if I came across as a bit dense. o_O
A package is a pre-compiled port. Ports build packages and it's those packages that eventually get installed. So in the end they're all packages, even the stuff you build from ports.
A 3rd party program? But what about multimedia/vlc

A package pre-compiled port.....:confused:

Been at this just about the whole day. My head is about to explode. So I think I will let this be and read the Handbook some more or re-read it and see how much I can understand o_O

Thank you all.

Oh by the way my /usr/port/port-mgmt/portmaster seems to have disappeared.
cd /usr/port/port-mgmt/portmaster
cd: /usr/port/port-mgmt/portmaster: No such file or directory
A 3rd party program? But what about multimedia/vlc
All ports/packages are third party applications because they are not part of the FreeBSD OS. Similar to VLC being a third party application on Windows (it's not created by Microsoft and supplied with the OS).
Oh by the way my /usr/port/port-mgmt/portmaster seems to have disappeared.
cd /usr/port/port-mgmt/portmaster
cd: /usr/port/port-mgmt/portmaster: No such file or directory

It's cd /usr/ports/ports-mgmt/portmaster. Plural.

I don't know how much you've got done in terms of installing 3rd party programs, tweaking system files, etc., but you have mentioned mixing ports and packages already.

I suggest you get a good nights sleep to clear your head, then read my tutorial and rebuild your system from scratch according to the procedure I outline so you've got things done in an orderly, efficient manner and have a good, solid base system installation to start with. That's totally up to you, though.

I wrote that tutorial specifically with people who had never used UNIX or the command line in mind, using ports and portmaster. I may have overestimated the ease of using portmaster for someone fresh from Windows, but I do think if you follow my instructions you could get a clean build.

Get your base system set up, edit your important files, tweak settings on your chosen 3rd party programs and enjoy your new OS.
Ah, thank you SirDice for the 3dr party app clarification.

Trihexagonal, errr...yes I will take up your suggestion and re-install Freebsd 11.1 but 1) using pkg instead of port and 2) using ZFS instead of UFS. However I would like to learn more about Freebsd and is it possible for me to use it without gui?

And I think with this my topic has come to an end. Thank you all for your advise.

Err, to Administrator, how do I start another thread/continue discussion based on Trihexagonal suggestions? It seems to have branched to another topic entirely..... And thank you for separating my SSD question and will not happen again.