git.iko.soy/typeable/nixpkgs
on master help sign in
Remove fetchMD5warn

Deprecation warnings should not be used in Nixpkgs because they spam innocent "nix-env -qa" users with (in this case) dozens of messages that they can't do anything about. This also reverts commit 2ca883338389b7ab995924a0cab0211993bdf1da.

commite3a873479eee4e19a852011d45b0fb653f6c9e89 authorEelco Dolstra <edolstra@gmail.com> dateWed 30 Nov 2016, 15:14 (10 years ago) parentf26ff0b
9 files changed+8−21
lib/trivial.nix−3 pkgs/build-support/fetchdarcs/default.nix+1−2 pkgs/build-support/fetchegg/default.nix+1−2 pkgs/build-support/fetchgit/default.nix+1−2 pkgs/build-support/fetchhg/default.nix+1−2 pkgs/build-support/fetchsvn/default.nix+1−2 pkgs/build-support/fetchsvnssh/default.nix+1−2 pkgs/build-support/fetchurl/default.nix+1−2 pkgs/top-level/make-tarball.nix+1−4
lib/trivial.nix−3
@@ -138,7 +138,4 @@ rec {
138138 */
139139 warn = msg: builtins.trace "WARNING: ${msg}";
140140 info = msg: builtins.trace "INFO: ${msg}";
141−
142− fetchMD5warn = name: context : data : info
143− "Deprecated use of MD5 hash in ${name} to fetch ${context}" data;
144141}
pkgs/build-support/fetchdarcs/default.nix+1−2
@@ -7,8 +7,7 @@ stdenv.mkDerivation {
77
88 outputHashAlgo = if sha256 == "" then "md5" else "sha256";
99 outputHashMode = "recursive";
10− outputHash = if sha256 == "" then
11− (stdenv.lib.fetchMD5warn "fetchdarcs" url md5) else sha256;
10+ outputHash = if sha256 == "" then md5 else sha256;
1211
1312 inherit url rev context;
1413}
pkgs/build-support/fetchegg/default.nix+1−2
@@ -11,8 +11,7 @@ stdenv.mkDerivation {
1111
1212 outputHashAlgo = if sha256 == "" then "md5" else "sha256";
1313 outputHashMode = "recursive";
14− outputHash = if sha256 == "" then
15− (stdenv.lib.fetchMD5warn "fetchegg" name md5) else sha256;
14+ outputHash = if sha256 == "" then md5 else sha256;
1615
1716 inherit version;
1817
pkgs/build-support/fetchgit/default.nix+1−2
@@ -50,8 +50,7 @@ stdenv.mkDerivation {
5050
5151 outputHashAlgo = if sha256 == "" then "md5" else "sha256";
5252 outputHashMode = "recursive";
53− outputHash = if sha256 == "" then
54− (stdenv.lib.fetchMD5warn "fetchgit" url md5) else sha256;
53+ outputHash = if sha256 == "" then md5 else sha256;
5554
5655 inherit url rev leaveDotGit fetchSubmodules deepClone branchName;
5756
pkgs/build-support/fetchhg/default.nix+1−2
@@ -15,8 +15,7 @@ stdenv.mkDerivation {
1515
1616 outputHashAlgo = if md5 != null then "md5" else "sha256";
1717 outputHashMode = "recursive";
18− outputHash = if md5 != null then
19− (stdenv.lib.fetchMD5warn "fetchhg" url md5) else sha256;
18+ outputHash = if md5 != null then md5 else sha256;
2019
2120 inherit url rev;
2221 preferLocalBuild = true;
pkgs/build-support/fetchsvn/default.nix+1−2
@@ -29,8 +29,7 @@ stdenv.mkDerivation {
2929
3030 outputHashAlgo = if sha256 == "" then "md5" else "sha256";
3131 outputHashMode = "recursive";
32− outputHash = if sha256 == "" then
33− (stdenv.lib.fetchMD5warn "fetchsvn" url md5) else sha256;
32+ outputHash = if sha256 == "" then md5 else sha256;
3433
3534 inherit url rev sshSupport openssh ignoreExternals;
3635
pkgs/build-support/fetchsvnssh/default.nix+1−2
@@ -8,8 +8,7 @@ stdenv.mkDerivation {
88
99 outputHashAlgo = if sha256 == "" then "md5" else "sha256";
1010 outputHashMode = "recursive";
11− outputHash = if sha256 == "" then
12− (stdenv.lib.fetchMD5warn "fetchsvnssh" url md5) else sha256;
11+ outputHash = if sha256 == "" then md5 else sha256;
1312
1413 sshSubversion = ./sshsubversion.exp;
1514
pkgs/build-support/fetchurl/default.nix+1−2
@@ -112,8 +112,7 @@ if (!hasHash) then throw "Specify hash for fetchurl fixed-output derivation: ${s
112112 outputHashAlgo = if outputHashAlgo != "" then outputHashAlgo else
113113 if sha512 != "" then "sha512" else if sha256 != "" then "sha256" else if sha1 != "" then "sha1" else "md5";
114114 outputHash = if outputHash != "" then outputHash else
115− if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else
116− (stdenv.lib.fetchMD5warn "fetchurl" (builtins.head urls_) md5);
115+ if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5;
117116
118117 outputHashMode = if (recursiveHash || executable) then "recursive" else "flat";
119118
pkgs/top-level/make-tarball.nix+1−4
@@ -63,15 +63,12 @@ releaseTools.sourceTarball rec {
6363 fi
6464
6565 # Check that all-packages.nix evaluates on a number of platforms without any warnings.
66− # Filter out MD5 warnings for now
6766 for platform in i686-linux x86_64-linux x86_64-darwin; do
6867 header "checking Nixpkgs on $platform"
6968
7069 NIXPKGS_ALLOW_BROKEN=1 nix-env -f . \
7170 --show-trace --argstr system "$platform" \
72− -qa --drv-path --system-filter \* --system 2>&1 >/dev/null |
73− (grep -v '^trace: INFO: Deprecated use of MD5 hash in fetch' || true) |
74− tee eval-warnings.log
71+ -qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
7572
7673 if [ -s eval-warnings.log ]; then
7774 echo "Nixpkgs on $platform evaluated with warnings, aborting"