X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fpkg_hash.c;h=8c31aa99f0f8a26ac248c4d7ddb8e7324fcce62b;hp=821cc71886e735e7f70a0446b73e4e8f8416e848;hb=a65b6cb58937885c115059aa571c2b3a57d90888;hpb=d79ee5c52f301aaa721f9061daf2c1d0c11e5615 diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 821cc71..8c31aa9 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -79,7 +79,7 @@ int dist_hash_add_from_file(const char *lists_dir, pkg_src_t * dist) sprintf_alloc(&list_file, "%s/%s", lists_dir, subname); if (file_exists(list_file)) { - if (pkg_hash_add_from_file(list_file, dist, NULL, 0)) { + if (pkg_hash_add_from_file(list_file, dist, NULL, 0, 0)) { free(list_file); return -1; } @@ -95,7 +95,7 @@ int dist_hash_add_from_file(const char *lists_dir, pkg_src_t * dist) int pkg_hash_add_from_file(const char *file_name, - pkg_src_t * src, pkg_dest_t * dest, int is_status_file) + pkg_src_t * src, pkg_dest_t * dest, int is_status_file, int state_flags) { pkg_t *pkg; FILE *fp; @@ -121,6 +121,7 @@ pkg_hash_add_from_file(const char *file_name, pkg = pkg_new(); pkg->src = src; pkg->dest = dest; + pkg->state_flag |= state_flags; ret = parse_from_stream_nomalloc(pkg_parse_line, pkg, fp, 0, &buf, len); @@ -185,7 +186,7 @@ int pkg_hash_load_feeds(void) sprintf_alloc(&list_file, "%s/%s", lists_dir, src->name); if (file_exists(list_file)) { - if (pkg_hash_add_from_file(list_file, src, NULL, 0)) { + if (pkg_hash_add_from_file(list_file, src, NULL, 0, 0)) { free(list_file); return -1; } @@ -213,7 +214,7 @@ int pkg_hash_load_status_files(void) if (file_exists(dest->status_file_name)) { if (pkg_hash_add_from_file - (dest->status_file_name, NULL, dest, 1)) + (dest->status_file_name, NULL, dest, 1, SF_NEED_DETAIL)) return -1; } }