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;
}
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;
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);
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;
}
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;
}
}
int dist_hash_add_from_file(const char *file_name, 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_dest_t * dest, int is_status_file, int state_flags);
int pkg_hash_load_feeds(void);
int pkg_hash_load_status_files(void);