libopkg: support https_proxy
[project/opkg-lede.git] / libopkg / opkg_conf.c
index ee151f574f3f09dc68fb705c8b1fb6564a130985..0cbd1ccab73fb1c8051ffd811d8e2c40f010e969 100644 (file)
@@ -58,6 +58,7 @@ opkg_option_t options[] = {
        {"ftp_proxy", OPKG_OPT_TYPE_STRING, &_conf.ftp_proxy},
        {"http_proxy", OPKG_OPT_TYPE_STRING, &_conf.http_proxy},
        {"http_timeout", OPKG_OPT_TYPE_STRING, &_conf.http_timeout},
+       {"https_proxy", OPKG_OPT_TYPE_STRING, &_conf.https_proxy},
        {"no_proxy", OPKG_OPT_TYPE_STRING, &_conf.no_proxy},
        {"test", OPKG_OPT_TYPE_BOOL, &_conf.noaction},
        {"noaction", OPKG_OPT_TYPE_BOOL, &_conf.noaction},
@@ -70,6 +71,7 @@ opkg_option_t options[] = {
        {"proxy_user", OPKG_OPT_TYPE_STRING, &_conf.proxy_user},
        {"query-all", OPKG_OPT_TYPE_BOOL, &_conf.query_all},
        {"size", OPKG_OPT_TYPE_BOOL, &_conf.size},
+       {"strip_abi", OPKG_OPT_TYPE_BOOL, &_conf.strip_abi},
        {"tmp_dir", OPKG_OPT_TYPE_STRING, &_conf.tmp_dir},
        {"verbosity", OPKG_OPT_TYPE_INT, &_conf.verbosity},
        {"verify_program", OPKG_OPT_TYPE_STRING, &_conf.verify_program},
@@ -218,7 +220,7 @@ opkg_conf_parse_file(const char *filename,
 
        while (1) {
                char *line;
-               char *type, *name, *value, *extra;
+               char *type, *name, *value;
 
                line_num++;
 
@@ -261,20 +263,6 @@ opkg_conf_parse_file(const char *filename,
                                         regmatch[9].rm_eo - regmatch[9].rm_so);
                }
 
-               extra = NULL;
-               if (regmatch[11].rm_so > 0) {
-                       if (regmatch[13].rm_so > 0
-                           && regmatch[13].rm_so != regmatch[13].rm_eo)
-                               extra =
-                                   xstrndup(line + regmatch[11].rm_so,
-                                            regmatch[13].rm_eo -
-                                            regmatch[11].rm_so);
-                       else
-                               extra = xstrndup(line + regmatch[11].rm_so,
-                                                regmatch[11].rm_eo -
-                                                regmatch[11].rm_so);
-               }
-
                if (regmatch[13].rm_so != regmatch[13].rm_eo
                    && strncmp(type, "dist", 4) != 0) {
                        opkg_msg(ERROR,
@@ -294,7 +282,7 @@ opkg_conf_parse_file(const char *filename,
                                if (!nv_pair_list_find
                                    ((nv_pair_list_t *) pkg_src_list, name)) {
                                        pkg_src_list_append(pkg_src_list, name,
-                                                           value, extra, 0);
+                                                           value, 0);
                                } else {
                                        opkg_msg(ERROR,
                                                 "Duplicate src declaration (%s %s). "
@@ -304,7 +292,7 @@ opkg_conf_parse_file(const char *filename,
                                if (!nv_pair_list_find
                                    ((nv_pair_list_t *) pkg_src_list, name)) {
                                        pkg_src_list_append(pkg_src_list, name,
-                                                           value, extra, 1);
+                                                           value, 1);
                                } else {
                                        opkg_msg(ERROR,
                                                 "Duplicate src declaration (%s %s). "
@@ -338,8 +326,6 @@ opkg_conf_parse_file(const char *filename,
                free(type);
                free(name);
                free(value);
-               if (extra)
-                       free(extra);
 
 NEXT_LINE:
                free(line);