1 --- a/libopkg/opkg_conf.h
2 +++ b/libopkg/opkg_conf.h
3 @@ -80,6 +80,7 @@ struct opkg_conf
8 int nodeps; /* do not follow dependencies */
9 int nocase; /* perform case insensitive matching */
13 @@ -51,6 +51,7 @@ enum {
17 + ARGS_OPT_FORCE_SIGNATURE,
20 static struct option long_options[] = {
21 @@ -87,6 +88,8 @@ static struct option long_options[] = {
22 {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
23 {"force-checksum", 0, 0, ARGS_OPT_FORCE_CHECKSUM},
24 {"force_checksum", 0, 0, ARGS_OPT_FORCE_CHECKSUM},
25 + {"force-signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE},
26 + {"force_signature", 0, 0, ARGS_OPT_FORCE_SIGNATURE},
27 {"noaction", 0, 0, ARGS_OPT_NOACTION},
28 {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
29 {"nodeps", 0, 0, ARGS_OPT_NODEPS},
30 @@ -210,6 +213,9 @@ args_parse(int argc, char *argv[])
31 case ARGS_OPT_DOWNLOAD_ONLY:
32 conf->download_only = 1;
34 + case ARGS_OPT_FORCE_SIGNATURE:
35 + conf->force_signature = 1;
40 --- a/libopkg/opkg_install.c
41 +++ b/libopkg/opkg_install.c
42 @@ -1306,13 +1306,15 @@ opkg_install_pkg(pkg_t *pkg, int from_up
43 if (opkg_verify_file (list_file_name, sig_file_name)){
44 opkg_msg(ERROR, "Failed to verify the signature of %s.\n",
47 + if (!conf->force_signature)
51 opkg_msg(ERROR, "Signature file is missing for %s. "
52 "Perhaps you need to run 'opkg update'?\n",
55 + if (!conf->force_signature)
60 --- a/libopkg/opkg_cmd.c
61 +++ b/libopkg/opkg_cmd.c
62 @@ -196,7 +196,7 @@ opkg_update_cmd(int argc, char **argv)
64 opkg_msg(NOTICE, "Signature check failed.\n");
67 + if (err && !conf->force_signature) {
68 /* The signature was wrong so delete it */
69 opkg_msg(NOTICE, "Remove wrong Signature file.\n");
70 unlink (tmp_file_name);