aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch
downloadtrunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip
trunk-47381HEADmaster
Diffstat (limited to 'package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch')
-rw-r--r--package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch b/package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch
new file mode 100644
index 0000000..8af4d40
--- /dev/null
+++ b/package/system/opkg/patches/240-fix-force-checksum-for-sha256.patch
@@ -0,0 +1,31 @@
+--- a/libopkg/opkg_install.c
++++ b/libopkg/opkg_install.c
+@@ -1364,12 +1364,22 @@ opkg_install_pkg(pkg_t *pkg, int from_up
+ file_sha256 = file_sha256sum_alloc(pkg->local_filename);
+ if (file_sha256 && strcmp(file_sha256, pkg->sha256sum))
+ {
+- opkg_msg(ERROR, "Package %s sha256sum mismatch. "
+- "Either the opkg or the package index are corrupt. "
+- "Try 'opkg update'.\n",
+- pkg->name);
+- free(file_sha256);
+- return -1;
++ if (!conf->force_checksum)
++ {
++ opkg_msg(ERROR,
++ "Package %s sha256sum mismatch. "
++ "Either the opkg or the package index are corrupt. "
++ "Try 'opkg update'.\n",
++ pkg->name);
++ free(file_sha256);
++ return -1;
++ }
++ else
++ {
++ opkg_msg(NOTICE,
++ "Ignored %s sha256sum mismatch.\n",
++ pkg->name);
++ }
+ }
+ if (file_sha256)
+ free(file_sha256);