Re: [PATCH v3 8/9] odb: return temporary ODB source when set
Patrick Steinhardt <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 11, 2026 at 12:54:14PM -0500, Justin Tobler wrote: > 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