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

Fix make-ext4-fs.nix to work with empty files folder #93175

Closed

Conversation

maxhbr
Copy link
Member

@maxhbr maxhbr commented Jul 15, 2020

Motivation for this change

Since the file nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix specifies sdImage.populateRootCommands = "", the folder ./files is empty and the glob ./files/* is empty. As a result the cp command fails due to missing operands.

This should be a non-breaking change.

Log output
The failing build log looks like:

[...]
copying path '/nix/store/6ibcrm0ix9jqk6d2f8mdjfvcj4cyc2vg-zstd-1.4.5-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/p7g2yn99srn46q6vh0r3dl7gs0apk8d0-zstd-1.4.5-man' from 'https://cache.nixos.org'...
Preparing store paths for image...
/nix/store/qyfkk34jqq9ax0dd2b7k1vqw6m8ifn11-coreutils-8.31/bin/cp: missing file operand
Try '/nix/store/qyfkk34jqq9ax0dd2b7k1vqw6m8ifn11-coreutils-8.31/bin/cp --help' for more information.
builder for '/nix/store/ic5nm8b7ywy0swazzrsd6wskbhlhlkiy-ext4-fs.img.zst.drv' failed with exit code
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Since the file `nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix`
specifies `sdImage.populateRootCommands = ""`, the folder `./files` is empty and
the glob `./files/*` is empty. As a result the `cp` command fails due to
missing operands.

Signed-off-by: Maximilian Huber <gh@maxhbr.de>
@maxhbr
Copy link
Member Author

maxhbr commented Jul 15, 2020

@mohe2015
Copy link
Contributor

mohe2015 commented Aug 30, 2020

@maxhbr I think this can be closed as #93824 got merged. Still thanks for (the same but quicker) fix.

@stale
Copy link

stale bot commented Apr 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2021
@Artturin Artturin closed this Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants