Skip to content

Comments

fetchToStore(): Don't always respect settings.readOnlyMode#10043

Merged
thufschmitt merged 2 commits intoNixOS:masterfrom
edolstra:fix-readonly-fetchToStore
Feb 20, 2024
Merged

fetchToStore(): Don't always respect settings.readOnlyMode#10043
thufschmitt merged 2 commits intoNixOS:masterfrom
edolstra:fix-readonly-fetchToStore

Conversation

@edolstra
Copy link
Member

@edolstra edolstra commented Feb 20, 2024

Motivation

It's now up to the caller whether readOnlyMode should be applied. In some contexts (like InputScheme::fetch()), we always need to fetch.

This fixes commands like nix search nixpkgs firefox when the nixpkgs flake is not already in the store.

Fixes #10040.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added with-tests Issues related to testing. PRs with tests have some priority fetching Networking with the outside (non-Nix) world, input locking labels Feb 20, 2024
@edolstra edolstra force-pushed the fix-readonly-fetchToStore branch from ce374df to a004b7c Compare February 20, 2024 09:47
Copy link
Member

@thufschmitt thufschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, indeed

Fixes #10039.

That seems strange. Is it the right issues?
In that case, can you add a test case for it?

@edolstra
Copy link
Member Author

Sorry, I meant #10040.

It's now up to the caller whether readOnlyMode should be applied. In
some contexts (like InputScheme::fetch()), we always need to fetch.
@edolstra edolstra force-pushed the fix-readonly-fetchToStore branch from 349f5d9 to 7cb4d0c Compare February 20, 2024 10:47
@thufschmitt thufschmitt merged commit 6f4bb1b into NixOS:master Feb 20, 2024
@github-actions
Copy link

Successfully created backport PR for 2.20-maintenance:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetching Networking with the outside (non-Nix) world, input locking with-tests Issues related to testing. PRs with tests have some priority

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

fetchGit regression in read-only mode

2 participants