forked from Mirror/pmbootstrap
pmb.helpers.pmaports: Add must_exist to cache signature for find()
As must_exist affects the return value of this function by changing it from returning None to raising an exception, we need to include it in the cache key. Otherwise, the must_exist value effectively gets "stuck" on whatever value it was set to when the given cache key was created. This causes weird issues, see [1] and [2]. As such, include it in the cache signature to fix this. [1]: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2601 [2]: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6507#note_481093 Supersedes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2601 Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2610 Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2604
This commit is contained in:
parent
740a5717d9
commit
15007e17d2
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ def find(
|
|||
) -> Path | None: ...
|
||||
|
||||
|
||||
@Cache("package", "subpackages", "with_extra_repos")
|
||||
@Cache("package", "must_exist", "subpackages", "with_extra_repos")
|
||||
def find(
|
||||
package: str,
|
||||
must_exist: bool = True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue