Download raw body.
pkg_add -u vs ldconfig
I know the problem. Diff makes sense and works as advertised. This is
something that pkg_add does anyway, this change just runs it on more
occasions, I don't think there's a downside.
Committed.
On 2024/12/02 22:29, Marc Espie wrote:
> It used to be we exec()d stuff all the time, which led to
> ldconfig -R being rerun regularly throughout pkg_add's run.
>
> Now, a lot of those execs are only run as @tags, so they get delayed until
> the final clean-up of all packages, which means that your binaries may
> appear temporarily broken if you start running something because it has
> finished updating, but pkg_add is not yet finished.
>
>
> The following patch is a compromise, it will run ldconfig after
> finishing each updateset, if the updateset changed the list
> of shared libraries.
>
> I think it's a reasonable trade-off. People do expect to be able to run
> a package as soon as it's finished updating, even if pkg_add -u is still
> running.
>
>
> Index: PkgAdd.pm
> ===================================================================
> RCS file: /build/data/openbsd/cvs/src/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm,v
> diff -u -p -r1.150 PkgAdd.pm
> --- PkgAdd.pm 2 Jan 2024 10:25:48 -0000 1.150
> +++ PkgAdd.pm 2 Dec 2024 21:24:00 -0000
> @@ -847,6 +847,7 @@ sub really_add($set, $state)
> $handle->location->{repository}->setup_cache($state->{setlist});
> }
> }
> + $state->ldconfig->ensure;
> delete $state->{partial};
> $set->{solver}->register_dependencies($state);
> if ($replacing) {
>
pkg_add -u vs ldconfig