Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2018 09:14:55 -0700 (MST)
From:      Dale Scott <dalescott@shaw.ca>
To:        Polytropon <freebsd@edvax.de>, Ian Zimmerman <itz@very.loosely.org>
Cc:        FreeBSD-Questions Mailinglist <freebsd-questions@freebsd.org>
Subject:   Re: packages vs ports, do they conflict?
Message-ID:  <20181219161455.6115411.69770.72403@shaw.ca>
In-Reply-To: <20181219083859.1de0e899.freebsd@edvax.de>
References:  <20181219045456.enlgh43ndhglad7b@matica.foolinux.mooo.com> <20181219083859.1de0e899.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Nice summary Polytropon! :-)


=C2=A0 Original Message =C2=A0
From: Polytropon
Sent: Wednesday, December 19, 2018 12:45 AM
To: Ian Zimmerman
Reply To: Polytropon
Cc: FreeBSD-Questions Mailinglist
Subject: Re: packages vs ports, do they conflict?

On Tue, 18 Dec 2018 20:54:56 -0800, Ian Zimmerman wrote:
> I just tried to compile a port for the first time, and I tried to follow
> the Handbook as closely as possible, as is fitting for a newbie.  So,
> after becoming root in the port directory, the first thing I tried was
> "make config-recursive".  And the first dialog of options was for bash.
> So I guess this port has the bash port as a dependency.

Correct.



> But I have
> already installed bash as a package!

That doesn't matter at this stage. As far as I know, the
dependency tree resolver just considers data from the ports
collection itself, there is no verification if something
is already installed - that would happen during port build
and dependency installation. It _might_ have a different
impact if a dependency is a build dependency or a runtime
dependency; build dependencies can be removed later on as
the program in question does not need it to run.



> If I go ahead with the build, will
> a bash port be built and installed too, overwriting the package
> installation - maybe with different and undesirable options?

That depends on the actual options. If you have installed
bash via pkg, the ports tree's default options have been
applied, and if you chose different options for bash _now_,
a re-installation with that new options will be performed.

Additionally, updating your installed software via pkg will
then surely remove your "custom bash" and replace it with
a newer "stock bash".



> How does
> this work in general?

Oh, that's very complicated... ;-)



> Can I mix packages and ports at all, or do I have
> to commit to one framework or the other for all software installs?

No, you can mix them within a certain "mindset":

If you're building ports with the default options, then
they will be equivalent to what you install via pkg.

When you're building a port, simply speaking, a package
is created, and pkg is then used to install that package.
For a normal "make install" call, an "implicite repository"
is assumed, which isn't a repository at all, just an
explicit package location and name.

As soon as you're _changing_ port options, conflicts
will arise. You'd have to use "pkg lock", then update
with pkg, then portsnap, then "pkg unlock", and finally
manually rebuild your custom ports. This is okay for
one or two custom ports, but if you have a lot of those,
things become inconvenient.

Using poudriere makes this a lot easier: You can create
your own repository (a real one!) containing all your
ports with non-default options, and pkg will source them
from your own machine, instead of using the ports with
the default options from the official locations. And
your build environment is nicely separated from your
actual OS installation, i. e., if something needs a
build dependency, it won't be installed into your main
environment.

It also does matter if you follow "Quarterly" or "Latest"
when using pkg and ports (ports tree updated with portsnap)
in parallel. With pkg's configuration file, you can setup
your source repositories according to your requirements.

https://wiki.freebsd.org/Ports/QuarterlyBranch



--=20
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org=
"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181219161455.6115411.69770.72403>