src = (pkg_src_t *) iter->data;
- if (src->extra_data) /* debian style? */
- sprintf_alloc(&url, "%s/%s/%s", src->value,
- src->extra_data,
- src->gzip ? "Packages.gz" : "Packages");
- else
- sprintf_alloc(&url, "%s/%s", src->value,
- src->gzip ? "Packages.gz" : "Packages");
+ sprintf_alloc(&url, "%s/%s", src->value,
+ src->gzip ? "Packages.gz" : "Packages");
sprintf_alloc(&list_file_name, "%s/%s", lists_dir, src->name);
char *sig_file_name;
/* download detached signitures to verify the package lists */
/* get the url for the sig file */
- if (src->extra_data) /* debian style? */
- sprintf_alloc(&url, "%s/%s/%s", src->value,
- src->extra_data, "Packages.sig");
- else
- sprintf_alloc(&url, "%s/%s", src->value,
- "Packages.sig");
+ sprintf_alloc(&url, "%s/%s", src->value,
+ "Packages.sig");
/* create filename for signature */
sprintf_alloc(&sig_file_name, "%s/%s.sig", lists_dir,
src = (pkg_src_t *) iter->data;
- if (src->extra_data && strcmp(src->extra_data, "__dummy__ "))
- continue;
-
- if (src->extra_data) /* debian style? */
- sprintf_alloc(&url, "%s/%s/%s", src->value,
- src->extra_data,
- src->gzip ? "Packages.gz" : "Packages");
- else
- sprintf_alloc(&url, "%s/%s", src->value,
- src->gzip ? "Packages.gz" : "Packages");
+ sprintf_alloc(&url, "%s/%s", src->value,
+ src->gzip ? "Packages.gz" : "Packages");
sprintf_alloc(&list_file_name, "%s/%s", lists_dir, src->name);
pkglist_dl_error = 0;
if (pkglist_dl_error == 0 && conf->check_signature) {
/* download detached signitures to verify the package lists */
/* get the url for the sig file */
- if (src->extra_data) /* debian style? */
- sprintf_alloc(&url, "%s/%s/%s", src->value,
- src->extra_data, "Packages.sig");
- else
- sprintf_alloc(&url, "%s/%s", src->value,
- "Packages.sig");
+ sprintf_alloc(&url, "%s/%s", src->value,
+ "Packages.sig");
/* create temporary file for it */
char *tmp_file_name;
while (1) {
char *line;
- char *type, *name, *value, *extra;
+ char *type, *name, *value;
line_num++;
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,
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). "
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). "
free(type);
free(name);
free(value);
- if (extra)
- free(extra);
NEXT_LINE:
free(line);
#include "libbb/libbb.h"
int pkg_src_init(pkg_src_t * src, const char *name, const char *base_url,
- const char *extra_data, int gzip)
+ int gzip)
{
src->gzip = gzip;
src->name = xstrdup(name);
src->value = xstrdup(base_url);
- if (extra_data)
- src->extra_data = xstrdup(extra_data);
- else
- src->extra_data = NULL;
return 0;
}
{
free(src->name);
free(src->value);
- if (src->extra_data)
- free(src->extra_data);
}
typedef struct {
char *name;
char *value;
- char *extra_data;
int gzip;
} pkg_src_t;
int pkg_src_init(pkg_src_t * src, const char *name, const char *base_url,
- const char *extra_data, int gzip);
+ int gzip);
void pkg_src_deinit(pkg_src_t * src);
#endif
pkg_src_t *pkg_src_list_append(pkg_src_list_t * list,
const char *name, const char *base_url,
- const char *extra_data, int gzip)
+ int gzip)
{
/* freed in pkg_src_list_deinit */
pkg_src_t *pkg_src = xcalloc(1, sizeof(pkg_src_t));
- pkg_src_init(pkg_src, name, base_url, extra_data, gzip);
+ pkg_src_init(pkg_src, name, base_url, gzip);
void_list_append((void_list_t *) list, pkg_src);
void pkg_src_list_deinit(pkg_src_list_t * list);
pkg_src_t *pkg_src_list_append(pkg_src_list_t * list, const char *name,
- const char *root_dir, const char *extra_data,
- int gzip);
+ const char *root_dir, int gzip);
#endif