Pkg vs Ports

B

BSDAppentic3

Guest
Which is the best way of install something here, in your thoughts?
If you want, you can explain why do you think what you think.
You can like
Code:
 pkg
You can like https://www.freshports.org/
Or simply don't have one of your preference and use both or none.
Feel free of expound your thoughts and opinions.
 
There is no 'best' way, it all depends on the circumstances.

Do you merely want to install software quickly and don't care for any finetuning (excluding regular configuring of course)? Then packages are the best way to go. You merely need to download and install 'm. Done. I use this method on my laptop because it's the easiest and fastest option,

But the moment you do need finetuning and a specific configuration then ports become the best option. Examples could be specific compiler flags, enabling or disabling certain options or of course changing options or settings.

And of course there's also door number three: combining the two. Build ports using the ports collection, then set up your own package repository which can then be used by other computers. This is what I used to do for my laptop when I eventually decided that I couldn't be bothered with the extra overhead anymore :)
 
BSDAppentic3

All pkgs are built from ports, and like ShelLuser already told if you want an uncomplicated way to manage third party software in your installation pkg is the way to go. Otherwise, if you build from ports a plethora of Ports OPTIONS and customization open up, at the cost of compiling everything by yourself.

Another thing about pkgs, they almost never are synced with ports. They are always some commits behind for obvious reasons, but using pkgs you have the option to use the quarterly repository (default, and supposed to be more stable) or the latest (more up-to-date). Well you can also use svn and use the quartely branch for ports but that is another story.

There are several tools to help to manage that ports building. I use ports-mgmt/poudriere but I usually recommend ports-mgmt/synth[1] for who won't get involved with port maintaining and/or others ports works. SYNTH, SYNTH.

Cheers!
 
lebarondemerde
But what happens if I want to install programs when I have no connection of none kind? Don't you put to think about that circumstance?
Not mine case. I have a good connection and a decent speed of connection. But I wonder about a user who have this OS and has troubles with the connection, the speed of it, or simply don't have one.
In that case, who have any of those kind of problems, the only option would comes to be the ports that should be previously installed on the system. And compilate them, the user can use the programs that needs. Always when it came inside the ports, of course.
 
lebarondemerde I must explain why I am thinking about it: I want to know what's the function of compilate. It's easy to install a program having a stable connection and using pkg, but if you don't have those?
Besides, maybe I will ask how and why should I must know what it's compilate. I read that it is some concept very important in informatic. But don't you gonna think that I will just write a post waiting for a user who have the experience gonna just tell me what does it means. I will search it by myself, too.
 
It is not as simple as compiling a port without a connection. When you make() a port, it downloads the sources—usually from the project that creates the port.

[BGCOLOR=transparent]It is conceivable, I suppose, that one could download the entire package database for offline installation, but I don’t know how much space one would need [/BGCOLOR]
 
If one just have connection sporadically, the best practice (IMO) would be to stick with quarterly pkg repository because that receive very little updates, and that is supposed to be stable.

pkg fetch -a should do the trick to download everything BUT that will take A LOT OF time and storage space SEE.

In the same situation for ports, one could run make -C /usr/ports fetch and download the distifiles for the entire tree, what will also take A LOT OF time and storage space - and would be better to use svn (instead of portsnap) to be able to checkout the quarterly ports branch instead of HEAD.

So, if you do not have internet connection at least often you are downed in any way. o_O

EDIT: I think it is safe to assume if someone does not have a reliable internet connection his/her computer should not be THAT fast too, and compiling from ports take time, a lot of time depending on what you are compiling (and hte machine used). The biggest one should be www/chromium, I do not use it and so I do not know how much time would take in here, but in general it seems to take about 16hs in a similar machine of mine (AMD FX-8020, 16GB RAM).
 
If all you want to do is to be able to reinstall something you already have, or put it on another machine, you can just build packages for all the stuff you have installed on your machine, like:

mkdir stored-packages
pkg create -a -o ~/stored-packages
tar -cf stored-packages.tar ~/stored-packages
cp stored-packages.tar /media/your-usb-disk-package-store/

Or, just copy the already installed packages from /var/cache/pkg/*.txz and store them somewhere. This would require a whole lot less space than the entire tree.
 
Of course isn't my case, lebarondemerde . As I said, I have a good connection.
But I want to know...what if I, despite that having a good connection and acceptable speed, what could happen if I haven't a good processor and less RAM (like 2GB or less)?
 
Back
Top