Date: Wed, 22 Jul 2015 08:03:18 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Don Lewis <truckman@FreeBSD.org> Cc: michelle@sorbs.net, freebsd-ports@FreeBSD.org Subject: Re: Just a thought Message-ID: <20150722060317.GJ21594@ivaldir.etoilebsd.net> In-Reply-To: <201507220136.t6M1aHMa099362@gw.catspoiler.org> References: <55AEE72A.308@sorbs.net> <201507220136.t6M1aHMa099362@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--dwWFXG4JqVa0wfCP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 21, 2015 at 06:36:17PM -0700, Don Lewis wrote: > On 22 Jul, Michelle Sullivan wrote: > > I'm using poudriere 3.0.19 (for good reason) so I don't know if this is > > already done, but from a recent set of mailings I don't think so... > >=20 > > Also pkgng doesn't seem to do it (again based on recent mailings) > >=20 > > You have the following package set: > >=20 > > pkga-2.0.1 =3D> pkgb-1.34.5 =3D> pkgc-34.4.2 =3D> pkgd-1.1.1 > >=20 > > where a =3D> b 'a' is a dependency of 'b'. > >=20 > > if the options are change for pkgb are changed, *or* pkgb has a new > > version 1.35.0 (or both) > >=20 > > Why are both pkgc and pkgd rebuilt/reinstalled? > >=20 > > Surely (logically) pkgc-34.4.2 needs to be rebuild because pkgb's ABI > > *may* have been changed... however pkgd should *not* need to be > > rebuilt/reinstalled because what it depends on has only been rebuilt for > > the current (last) version and should have absolutely no ABI change. > >=20 > > So in the real world if (recent example) OpenSSL is rebuilt because of a > > new version/patch (1.0.2a -> 1.0.2c) only those ports that actually have > > OpenSSL as a *direct dependency* (ie those that link to the openssl > > libraries) need to be rebuilt (they might not actually even need that if > > it's just a security patch that doesn't change any of the public > > interface, but one cannot easily tell that so rebuilding is required to > > be safe) ... but why would you need to rebuild 1000+ ports (my case) > > because OpenSSL has been patched... ie modssl has been update and > > therefore apache has been updated then everything thing under the sun > > that depends on apache gets rebuilt because apache was rebuilt even > > though the apache version is identical....? >=20 > Poudriere is kind of dumb about this. If it sees that pkgb needs to be > rebuilt, then it blows away pkgc, and then it blows away pkgd because it > sees that pkgd's dependency (pkgc) is missing. >=20 > What you say is mostly true, but there are some cases where rebuiding > pkgd is necessary because it turns out to directly depend on pkgb but > the dependency is not listed as a direct dependency. One potential > cause of this is the configure script in pkgd noticing the presence of > pkgb and adding it to the list of libraries to be linked to. Another > case can happen if the .pc file for pkgc lists a library from pkgb as a > library to also link to when linking to a library from pkgc. Poudriere > won't catch this when it builds pkgd because when it installs pkgc, pkgb > also gets installed because it is a dependency of pkgc. In theory the > Q/A tools should be able to catch this by looking at the shared > libraries that are directly referenced by the shared libraries and > executables in pkgd and verifying that the come from packages that are > listed as dependencies, but that's not how things are currently > implemented. The main reason for the useless rebuild is fairly simple and we are working= on a fix for that: pkg inherited from pkg_tools the was the dependencies are registered (aka name-version) which is totally insane as a version is hardc= oded, we are working to dropping that version. This version is only used for the = add subcommnd which is only used by the ports tree itself and people that have switched to pkg but "only" did the quick switch of their tools/script by s/= _//g =66rom pkg_tools to pkg. In pkg we just made a modification which will allo= w to stop hardcoded those version hence reduce the over rebuild of package in incremental build on poudriere. Note that the other reason for overrebuild is to catch overlinking (a packa= ge not officially directly depending on another one but which end up linked - = in a elf file to it) The last reason is to catch "forgotten" revision bumped. You might see after pkg 1.6 is out a reduction of the over rebuild (at least option to have a less aggressive incremental build). >=20 > > ...even pkg has this issue it seems... the only minor difference is if a > > package is installed it should (in theory) use the already downloaded > > (cached) version of that package... but why does it need to > > deinstall/reinstall? (or is that only what it displays and it doesn't > > actually do it?) >=20 As explained above pkg will not reinstall all of them but only the one actu= ally needed. pkg has way more useful information to decided when reinstalling is needed (like shared libraries used) than the ports tree at build time, so we can have a saner model of reinstall and mostly only reinstall what we really need to reinstall. Bapt --dwWFXG4JqVa0wfCP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlWvMiUACgkQ8kTtMUmk6ExS4wCdERLq8yX/ApXTDBzkRhzUDaYe 1R0An2N1u0LBv6sPpIWnmSr2daxEFkXE =F12Q -----END PGP SIGNATURE----- --dwWFXG4JqVa0wfCP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150722060317.GJ21594>