1 --- opkg-4564/configure.ac-orig 2008-08-04 19:39:20.000000000 -0500
2 +++ opkg-4564/configure.ac 2008-08-04 19:37:17.000000000 -0500
8 -PKG_CHECK_MODULES(CURL, libcurl)
10 + AC_HELP_STRING([--enable-curl], [Enable use of libcurl instead of wget
12 + [want_curl="$enableval"], [want_curl="yes"])
14 +if test "x$want_curl" = "xyes"; then
16 + PKG_CHECK_MODULES(CURL, libcurl)
17 + AC_DEFINE(HAVE_CURL, 1, [Define if you want to use libcurl instead of wget])
22 --- opkg-4564/libopkg/opkg.c-orig 2008-08-04 19:39:38.000000000 -0500
23 +++ opkg-4564/libopkg/opkg.c 2008-08-04 19:37:17.000000000 -0500
30 #include <curl/curl.h>
33 * @brief Check the accessibility of repositories. It will try to access the repository to check if the respository is accessible throught current network status.
34 * @param opkg The opkg_t
38 err = opkg_download(opkg->conf, iter1->data, "/dev/null", NULL, NULL);
40 if (!(err == CURLE_OK ||
41 err == CURLE_HTTP_RETURNED_ERROR ||
42 err == CURLE_FILE_COULDNT_READ_FILE ||
48 str_list_elt_deinit(iter1);
51 --- opkg-4564/libopkg/opkg_download.c-orig 2008-08-04 19:39:56.000000000 -0500
52 +++ opkg-4564/libopkg/opkg_download.c 2008-08-04 19:37:17.000000000 -0500
54 General Public License for more details.
58 #include <curl/curl.h>
64 setenv("no_proxy", conf->no_proxy, 1);
70 FILE * file = fopen (tmp_file_location, "w");
75 +#else /* if wget is selected */
77 + /* XXX: BUG rewrite to use execvp or else busybox's internal wget -Jamey 7/23/2002 */
78 + sprintf_alloc(&cmd, "wget --passive-ftp %s %s%s %s%s -P %s %s",
79 + (conf->http_proxy || conf->ftp_proxy) ? "--proxy=on" : "",
80 + conf->proxy_user ? "--proxy-user=" : "",
81 + conf->proxy_user ? conf->proxy_user : "",
82 + conf->proxy_passwd ? "--proxy-passwd=" : "",
83 + conf->proxy_passwd ? conf->proxy_passwd : "",
89 + opkg_message(conf,OPKG_ERROR, "%s: ERROR: Command failed with return value %d: `%s'\n",
90 + __FUNCTION__, err, cmd);
92 + unlink(tmp_file_location);
93 + free(tmp_file_location);
101 err = file_move(tmp_file_location, dest_file_name);