Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: '~/.cache/nixpkgs-update/worktree/package' is a shallow Git repository #382

Open
tennox opened this issue Jan 22, 2024 · 3 comments

Comments

@tennox
Copy link

tennox commented Jan 22, 2024

I tried using this tool (via nix shell .. github:ryantm/nixpkgs-update) to update chatgpt-cli:

nixpkgs on  chatgpt-update:master [$]
❯ nixpkgs-update update 'chatgpt-cli 1.2.0 1.4.0'
[options] github_user: r-ryantm, pull_request: NO, batch_update: NO, calculate_outpaths: NO, cve_report: NO, nixpkgs-review: NO, nixpkgs_dir: "/home/manu/dev/nix/nixpkgs", use attrpath: NO
creating xdgRuntimeDir
For attrpath chatgpt-cli, using log file: /run/user/1000/nixpkgs-update/chatgpt-cli/2024-01-22.log
chatgpt-cli 1.2.0 -> 1.4.0
attrpath: chatgpt-cli
Received ExitFailure 1 when running
Raw command: /nix/store/3nqhcyc7vid1npgcd0m7arg5sn325nhz-nix-2.12.0/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes eval .#chatgpt-cli --apply "p: builtins.hasAttr \"updateScript\" p"
Standard error:

error: '/home/manu/.cache/nixpkgs-update/worktree/chatgpt-cli' is a shallow Git repository, but shallow repositories are only allowed when `shallow = true;` is specified.
(use '--show-trace' to show detailed location information)

[result] Failed to update chatgpt-cli 1.2.0 -> 1.4.0

nixpkgs on  chatgpt-update:master [$] took 33s
❯ /nix/store/3nqhcyc7vid1npgcd0m7arg5sn325nhz-nix-2.12.0/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes eval .#chatgpt-cli --apply "p: builtins.hasAttr \"updateScript\" p"
false
@tennox
Copy link
Author

tennox commented Mar 7, 2024

Encountered the same for a different package (and found my own issue when searching 😅 )

nixpkgs on master [$] via ❄  impure (devenv-shell-env)
❯ nix shell \
        --option extra-substituters 'https://nixpkgs-update.cachix.org/' \
        --option extra-trusted-public-keys 'nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=' \
        github:ryantm/nixpkgs-update

nixpkgs on master [$] via ❄  impure (devenv-shell-env)
❯ nixpkgs-update update "cargo-shuttle 0.39.0 0.41.0"
[options] github_user: r-ryantm, pull_request: NO, batch_update: NO, calculate_outpaths: NO, cve_report: NO, nixpkgs-review: NO, nixpkgs_dir: "/home/manu/dev/nix/nixpkgs", use attrpath: NO
creating xdgRuntimeDir
For attrpath cargo-shuttle, using log file: /run/user/1000/nixpkgs-update/cargo-shuttle/2024-03-07.log
cargo-shuttle 0.39.0 -> 0.41.0
attrpath: cargo-shuttle
Received ExitFailure 1 when running
Raw command: /nix/store/3nqhcyc7vid1npgcd0m7arg5sn325nhz-nix-2.12.0/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes eval .#cargo-shuttle --apply "p: builtins.hasAttr \"updateScript\" p"
Standard error:

error: '/home/manu/.cache/nixpkgs-update/worktree/cargo-shuttle' is a shallow Git repository, but shallow repositories are only allowed when `shallow = true;` is specified.
(use '--show-trace' to show detailed location information)

[result] Failed to update cargo-shuttle 0.39.0 -> 0.41.0

@running-grass
Copy link

I also have the same problem

@running-grass
Copy link

running-grass commented Oct 22, 2024

I also have the same problem我也有同样的问题

I found the cause of my issue. It was because the nixpkgs repository was cloned using a shallow clone. After switching to a full clone using git fetch --unshallow, the problem was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants