perl: run initLibStore() on openStore()#7705
Conversation
|
Shouldn't it call If you do need to use |
I'm making some changes to make that suggestion work.
|
|
I would just do |
|
(Really I would consider all initialization for sake of ambient authority tech debt, it is indeed unclear when it is needed! As we improve the situation over time with explicit capabilities one passes around, it will become clearer what one is supposed to do. @roberth's PR is still good for at least narrowing the scope of which things need the ambient authority; it is like a triaging step.) |
Since NixOS#7478 it's mandatory that `initLibStore()` is called for store operations. However that's not the case when running `openStore()` in Perl using the perl-bindings. That breaks e.g. `hydra-eval-jobset` when built against Nix 2.13 which uses small portions of the store API.
b7d5047 to
51013da
Compare
Ericson2314
left a comment
There was a problem hiding this comment.
Now just rename the PR title! :)
|
This is future work, but I am thinking another lesson here is that bindings (Perl, but we wish to have more in the future) should have basic tests. |
initNix() on openStore()initLibStore() on openStore()
Also updated the PR's description. Also, I guess this is a candidate for backporting to 2.13? |
|
Yes it should be, since it fixes a regression. |
@Ericson2314 can you add the necessary label, would've done it, but I can't %) |
See [#7704][1] and [#7705][2] for details. [1]: NixOS/nix#7704 [2]: NixOS/nix#7705
|
Successfully created backport PR for |
|
Merged so that we can potentially deliver the fix sooner. A follow-up with a test would be much appreciated. |
Motivation
Fix calling
openStore()from Perl code (needed e.g. in Hydra)Context
Since #7478 it's mandatory that
initLibStore()is called for store operations. However that's not the case when runningopenStore()in Perl using the perl-bindings. That breaks e.g.hydra-eval-jobsetwhen built against Nix 2.13 which uses small portions of the store API.Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.shsrc/*/teststests/nixos/*