Nixpkgs version
Describe the bug
The usage of diffoscope causes difference in the directory stat "size" to be reported as actual content differences. However, the number stat reports for a directory is arbitrary, file system dependent, and may differ, depending on the history of the directory.
Example:
Steps to reproduce
This may be tricky to reproduce.
I believe ext4 does not scale down the allocated space for a directory, so you could create a directory with many files, remove most of them except one, and compare it to a fresh directory that only ever had that one file.
Expected behaviour
Directory stat details are ignored.
Screenshots
No response
Relevant log output
error: builder for '/nix/store/rmkv6qyj0c0apwizi416rgagn1scd0j2-equal-contents-trivial-patch-does-not-change-source-contents.drv' failed with exit code 1;
last 25 log lines:
> │ │ --- /nix/store/m5d4p9qxqz6ldzi001zmdja29r66hyrm-nix-source-patched-source/tests/functional
> │ ├── +++ /nix/store/1mgs90n2grwxlcn19kxhz5b3fm9gd56h-f3bwis7cbrg5z42wzvfz1h7m3ndabkb9-source/tests/functional
> │ │ │ --- /nix/store/m5d4p9qxqz6ldzi001zmdja29r66hyrm-nix-source-patched-source/tests/functional/lang
> │ │ ├── +++ /nix/store/1mgs90n2grwxlcn19kxhz5b3fm9gd56h-f3bwis7cbrg5z42wzvfz1h7m3ndabkb9-source/tests/functional/lang
> │ │ │ ├── stat {}
> │ │ │ │ @@ -1,7 +1,7 @@
> │ │ │ │
> │ │ │ │ + Size: 32768 Blocks: 64 IO Block: 4096 directory
> │ │ │ │ - Size: 28672 Blocks: 64 IO Block: 4096 directory
> │ │ │ │ Device: 8,17 Access: (0555/dr-xr-xr-x) Uid: (65534/ nobody) Gid: (65534/ nogroup)
> │ │ │ │
> │ │ │ │ Modify: 1970-01-01 00:00:01.000000000 +0000
> │ │ │ ├── stat {}
> │ │ │ │ @@ -1,7 +1,7 @@
> │ │ │ │
> │ │ │ │ - Size: 28672 Blocks: 64 IO Block: 4096 directory
> │ │ │ │ + Size: 32768 Blocks: 64 IO Block: 4096 directory
> │ │ │ │ Device: 8,17 Access: (0555/dr-xr-xr-x) Uid: (65534/ nobody) Gid: (65534/ nogroup)
> │ │ │ │
> │ │ │ │ Modify: 1970-01-01 00:00:01.000000000 +0000
>
> Contents must be equal, but were not!
>
> +: expected, at /nix/store/1mgs90n2grwxlcn19kxhz5b3fm9gd56h-f3bwis7cbrg5z42wzvfz1h7m3ndabkb9-source
> -: unexpected, at /nix/store/m5d4p9qxqz6ldzi001zmdja29r66hyrm-nix-source-patched-source
Additional context
https://github.com/NixOS/nix/actions/runs/14081916008/job/39436628264?pr=12759
System metadata
Discovered on GitHub Actions, unknown
Notify maintainers
@tie
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Nixpkgs version
Describe the bug
The usage of
diffoscopecauses difference in the directorystat"size" to be reported as actual content differences. However, the numberstatreports for a directory is arbitrary, file system dependent, and may differ, depending on the history of the directory.Example:
Steps to reproduce
This may be tricky to reproduce.
I believe ext4 does not scale down the allocated space for a directory, so you could create a directory with many files, remove most of them except one, and compare it to a fresh directory that only ever had that one file.
Expected behaviour
Directory
statdetails are ignored.Screenshots
No response
Relevant log output
Additional context
https://github.com/NixOS/nix/actions/runs/14081916008/job/39436628264?pr=12759
System metadata
Discovered on GitHub Actions, unknown
Notify maintainers
@tie
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.