Re: [PATCH v3 8/9] odb: return temporary ODB source when set
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 12, 2026, 06:07 UTC
- Message-ID
- <anwNsTpB7XwZa8hh@pks.im>
- In-Reply-To
- <20260811175415.2044235-9-jltobler@gmail.com>
On Tue, Aug 11, 2026 at 12:54:14PM -0500, Justin Tobler wrote:
Show 11 quoted lines
> When invoked, `odb_set_temporary_primary_source()` installs a temporary > object directory as the new primary ODB source. A caller that wants to > operate on the ODB source of the open transaction must assume that it is > the first entry in the ODB source list which is a bit awkward and > fragile. > > Instead, return the newly installed source directly and report the > previous primary source via a new `prev_source` out parameter. Propagate > the installed source through `tmp_objdir_replace_primary_odb()` and > start storing it in the "files" ODB transaction so a subsequent commit > can easily access it without relying on the ODB source list ordering.
Makes sense. I'm looking forward to the day where we get rid of this mechanism altogether.
Patrick