diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-11-19 03:33:31 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-12-26 20:02:01 +0200 |
commit | 0101944621e18096c3f1404654bb43a55861910f (patch) | |
tree | 9c783c62846a10b16ac11f36ea9f1a198386e981 /pkgs | |
parent | e3b0c0350793349afc1602431da2895eb0041a82 (diff) | |
download | nixlib-0101944621e18096c3f1404654bb43a55861910f.tar nixlib-0101944621e18096c3f1404654bb43a55861910f.tar.gz nixlib-0101944621e18096c3f1404654bb43a55861910f.tar.bz2 nixlib-0101944621e18096c3f1404654bb43a55861910f.tar.lz nixlib-0101944621e18096c3f1404654bb43a55861910f.tar.xz nixlib-0101944621e18096c3f1404654bb43a55861910f.tar.zst nixlib-0101944621e18096c3f1404654bb43a55861910f.zip |
update-source-version: Check for sources not dependent on ${version}
Diffstat (limited to 'pkgs')
-rwxr-xr-x | pkgs/common-updater/scripts/update-source-version | 5 |
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 c5f7db281625..4c4cb56fb320 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!" |