[Bug 258357] pkgbase upgrade leaves FreeBSD-utilities effectively uninstalled

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Sep 2021 20:57:30 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258357

--- Comment #10 from Mark Johnston <markj_at_FreeBSD.org> ---
I dug into this a bit more and was able to fix it locally.  Basically, when
splitting an upgrade into separate remove and install jobs, we assign the
remove job a special type, PKG_SOLVED_UPGRADE_REMOVE, not PKG_SOLVED_DELETE. 
I'm not sure exactly why that's needed, as they are mostly handled identically
outside of the job prioritization code, and I still don't really understand
that code.

After splitting jobs and assigning priorities, we sort the job list according
to the numeric priority.  When two jobs have identical priority, higher
precedence is given to jobs of type not equal to PKG_SOLVED_DELETE.  If I
change this to PKG_SOLVED_DELETE || PKG_SOLVED_UPGRADE_REMOVE, then the job
list gets sorted in such a way that the problem doesn't occur.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Mon Sep 13 2021 - 20:57:30 UTC

Original text of this message