opkg: skip downloading Packages.sig if GPGME is not enabled at build time
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:01:47 +0000 (05:01 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:01:47 +0000 (05:01 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@55 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_cmd.c

index ea815ec7d47a71053cc134a045f6f6440a344b76..463b15d49f5081117c622ea57fad35e70bd4175a 100644 (file)
@@ -257,6 +257,7 @@ static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv)
          }
          free(url);
 
+#ifdef HAVE_GPGME
          /* download detached signitures to verify the package lists */
          /* get the url for the sig file */
          if (src->extra_data)  /* debian style? */
@@ -284,8 +285,11 @@ static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv)
          }
          unlink (tmp_file_name);
          free (tmp_file_name);
-
          free (url);
+#else
+         opkg_message (conf, OPKG_NOTICE, "Signiture check for %s skipped "
+              "because GPG support was not enabled in this build\n", src->name);
+#endif
          free(list_file_name);
      }
      rmdir (tmp);