pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_add vs pkgin



On Tue, May 14, 2019 at 02:22:50PM +0200, Aleksej Lebedev wrote:
> Pkg_add/pkg_delete are reliable. Their job, however, is quite
> simple:
> 
>      - pkg_add is to install packages and their dependencies (if any);
>      - pkg_delete is to remove packages and (if requested) those that depend on them.
> 
> Pkg_add can perform a very simple upgrade, but if you request to install/upgrade a package that
> depends on another package older version of which is already installed on your system
> you will get an error as pkg_add will blindly try to install the newer version on top of the old
> (and get a conflict).

Thanks Aleksej.

I think the writeup can then be made a little more objective, in that
case.

`upgrades, and sometimes even installation itself' implies that, pkg_add
sometimes may not handle a basic installation scenario (other than you
mentioned) well, as well.

> Pkgin is more advanced: it builds a whole dependency tree and upgrade all dependencies.

I do not know what others' experience with binary installation in general
is.  And I am not even talking about build options mismatch here.

I often try to switch to binary mode. Then one odd time you'll come across
something that's not present in the binary repository and then you'd want
to turn to pkgsrc. Often by that time some things would have evolved and
pkgsrc would simply disregard your binary installation of some packages
(and for a reason) and you'll end up building it all over again. Further
you have to take pains of finding all deps and installing manually.

Recently I switched to binary mode and realized firefox wasn't present in
the repo. I installed all deps manually and found that when I tried
building firefox it went down to very low level like perl, python etc. to
build them on its own. [ Incidentally I was able to build rust and firefox
after a long gap! ]

What I have learned over time is to forget trying to avoid compilation and
just stick to pkgsrc. But I may be missing some tricks. I do not know if
there are smarter ways to combine pkgsrc and binary repo.

A pkgsrc level tool / script that installs deps transitively iff the
dependency version check is also met, else switches to building by itself
would be immensely useful. Besides, there may also be a check on whether
the binary package (or its mk.conf) matches with options set in local
mk.conf.  If the options don't match it will fall back to pkgsrc. Further,
mk.conf may have a directive to always force source build for some
packages. etc.

Mayuresh



Home | Main Index | Thread Index | Old Index