summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-11-19 03:33:31 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-12-26 20:02:01 +0200
commit0101944621e18096c3f1404654bb43a55861910f (patch)
tree9c783c62846a10b16ac11f36ea9f1a198386e981 /pkgs
parente3b0c0350793349afc1602431da2895eb0041a82 (diff)
downloadnixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar.gz
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar.bz2
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar.lz
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar.xz
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.tar.zst
nixpkgs-0101944621e18096c3f1404654bb43a55861910f.zip
update-source-version: Check for sources not dependent on ${version}
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/common-updater/scripts/update-source-version5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version
index c5f7db28162..4c4cb56fb32 100755
--- a/pkgs/common-updater/scripts/update-source-version
+++ b/pkgs/common-updater/scripts/update-source-version
@@ -82,6 +82,11 @@ if [ -z "$newHash" ]; then
     die "Couldn't figure out new hash of '$attr.src'!"
 fi
 
+if [ "$oldVersion" != "$newVersion" ] && [ "$oldHash" = "$newHash" ]; then
+    mv "$nixFile.bak" "$nixFile"
+    die "Both the old and new source hashes of '$attr.src' were equivalent. Please fix the package's source URL to be dependent on '\${version}'!"
+fi
+
 sed -i "$nixFile" -re "s|\"$tempHash\"|\"$newHash\"|"
 if cmp -s "$nixFile" "$nixFile.bak"; then
     die "Failed to replace temporary source hash of '$attr' to the final source hash!"