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 2ca8833383.
This commit is contained in:
Eelco Dolstra 2016-11-30 15:14:30 +01:00
parent f26ff0b1bd
commit e3a873479e
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
9 changed files with 8 additions and 21 deletions

View File

@ -138,7 +138,4 @@ rec {
*/
warn = msg: builtins.trace "WARNING: ${msg}";
info = msg: builtins.trace "INFO: ${msg}";
fetchMD5warn = name: context : data : info
"Deprecated use of MD5 hash in ${name} to fetch ${context}" data;
}

View File

@ -7,8 +7,7 @@ stdenv.mkDerivation {
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then
(stdenv.lib.fetchMD5warn "fetchdarcs" url md5) else sha256;
outputHash = if sha256 == "" then md5 else sha256;
inherit url rev context;
}

View File

@ -11,8 +11,7 @@ stdenv.mkDerivation {
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then
(stdenv.lib.fetchMD5warn "fetchegg" name md5) else sha256;
outputHash = if sha256 == "" then md5 else sha256;
inherit version;

View File

@ -50,8 +50,7 @@ stdenv.mkDerivation {
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then
(stdenv.lib.fetchMD5warn "fetchgit" url md5) else sha256;
outputHash = if sha256 == "" then md5 else sha256;
inherit url rev leaveDotGit fetchSubmodules deepClone branchName;

View File

@ -15,8 +15,7 @@ stdenv.mkDerivation {
outputHashAlgo = if md5 != null then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if md5 != null then
(stdenv.lib.fetchMD5warn "fetchhg" url md5) else sha256;
outputHash = if md5 != null then md5 else sha256;
inherit url rev;
preferLocalBuild = true;

View File

@ -29,8 +29,7 @@ stdenv.mkDerivation {
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then
(stdenv.lib.fetchMD5warn "fetchsvn" url md5) else sha256;
outputHash = if sha256 == "" then md5 else sha256;
inherit url rev sshSupport openssh ignoreExternals;

View File

@ -8,8 +8,7 @@ stdenv.mkDerivation {
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then
(stdenv.lib.fetchMD5warn "fetchsvnssh" url md5) else sha256;
outputHash = if sha256 == "" then md5 else sha256;
sshSubversion = ./sshsubversion.exp;

View File

@ -112,8 +112,7 @@ if (!hasHash) then throw "Specify hash for fetchurl fixed-output derivation: ${s
outputHashAlgo = if outputHashAlgo != "" then outputHashAlgo else
if sha512 != "" then "sha512" else if sha256 != "" then "sha256" else if sha1 != "" then "sha1" else "md5";
outputHash = if outputHash != "" then outputHash else
if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else
(stdenv.lib.fetchMD5warn "fetchurl" (builtins.head urls_) md5);
if sha512 != "" then sha512 else if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5;
outputHashMode = if (recursiveHash || executable) then "recursive" else "flat";

View File

@ -63,15 +63,12 @@ releaseTools.sourceTarball rec {
fi
# Check that all-packages.nix evaluates on a number of platforms without any warnings.
# Filter out MD5 warnings for now
for platform in i686-linux x86_64-linux x86_64-darwin; do
header "checking Nixpkgs on $platform"
NIXPKGS_ALLOW_BROKEN=1 nix-env -f . \
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system 2>&1 >/dev/null |
(grep -v '^trace: INFO: Deprecated use of MD5 hash in fetch' || true) |
tee eval-warnings.log
-qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
if [ -s eval-warnings.log ]; then
echo "Nixpkgs on $platform evaluated with warnings, aborting"