Skip to content

Relocated store URI is reported as 'local', wrong #11873

Open
@roberth

Description

Describe the bug

The store location in an error message is wrong. See steps.

Steps To Reproduce

There's probably an easier way to trigger this.

  1. Choose or make an unimportant store path <path>
  2. Back up a store path with nix copy --to ~/recoverstore <path>
  3. Corrupt the original store path by mounting the system store file system rw and deleting it from the file system. Do not delete it from the store db; we want that entry to remain.
  4. sudo nix store repair --extra-substituters ~/recoverstore --extra-trusted-substituters ~/recoverstore <path> (the latter option seems to have no effect; need ?trusted=true; different issue)

Observe a message like

warning: ignoring substitute for '/nix/store/nzb7spdhiy30ikv1crnk8dgl0svyjgw4-libunistring-1.2' from 'local', as it's not signed by any of the keys in 'trusted-public-keys'

Expected behavior

warning: ignoring substitute for '/nix/store/nzb7spdhiy30ikv1crnk8dgl0svyjgw4-libunistring-1.2' from '/root/recoverstore', as it's not signed by any of the keys in 'trusted-public-keys'

nix-env --version output

2.24.10

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    bugerror-messagesConfusing messages and better diagnosticsstoreIssues and pull requests concerning the Nix store

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions