The Sintel torrent used for testing fetchtorrent is about 124MB, which
is downloaded and cached for every test every time the test inputs
change. Avoid that by instead validating the file hashes in the
postFetch stage, then deleting the downloaded files, so the only thing
that needs to be stored is an empty directory.
I don’t know why setting `--config-dir` breaks the finish script
with Transmission 4, but I don’t really feel like spending more
time investigating than I already did. It does still respect the
passed settings, since we were passing the default location anyway.
Currently, the output from fetchtorrent will be different depending on
whether the default "transmission" backend or the "rqbit" backend is
used, because "rqbit" changed its behaviour in v6.0.0 to create
subdirectories.
Restore the old behaviour for the rqbit backend of flattening the
directory structure, but add a "flatten" argument to allow users to
explicitly request the behaviour without this change.
Because fetchtorrent produces fixed-output derivations, it's possible
that people won't notice the changes in behaviour here, so add a warning
that the behaviour might be unexpected (in either direction!) if the
flatten argument isn't specified for the rqbit backend, and -- to avoid
needing to support it indefinitely -- a warning that `flatten = false`
will be deprecated in future.
Update the fetchtorrent tests to check all the relevant combinations,
and to mark all tests as now working.
Update the release notes to advertise this breaking change.
Fixes#432001.
The arguments to `fetchtorrent` are supposed to throw an error if the
user attempts to specify JSON configuration when they're not using the
transmission backend, however a logic error means the error will never
be thrown.
Move the test to somewhere where the behaviour will actually be checked.
The postFetch and postUnpack hooks ought to be run in fetchtorrent
regardless of the backend in use. Ensure that's the case, rather than
only running them if the transmission backend is being used.
The current torrent used for testing fetchtorrent isn't free, which
prevents the tests running in a lot of environments. Swap for a torrent
of the Sintel film, which has a free license.
This unfortunately increases the closure size of the tests: Sintel is
124MB, compared to 54MB for the Wired CD. This was the smallest torrent
I could find that both had a free license and was sufficiently well
seeded to be useful for testing.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH