Skip to content

Commit 5509734

Browse files
committed
lib: correctly set is_signed
1 parent 394306a commit 5509734

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/repo.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ repo_read_meta(struct xbps_repo *repo, struct archive *ar)
188188
repo->uri, archive_error_string(ar));
189189
return -archive_errno(ar);
190190
}
191-
repo->idxmeta = xbps_dictionary_create();
191+
repo->idxmeta = NULL;
192192
return 0;
193193
}
194194

@@ -213,15 +213,18 @@ repo_read_meta(struct xbps_repo *repo, struct archive *ar)
213213

214214
if (!repo->idxmeta) {
215215
if (!r) {
216-
xbps_error_printf("failed to read repository metadata: %s: invalid dictionary\n",
216+
xbps_error_printf("failed to read repository metadata: "
217+
"%s: invalid dictionary\n",
217218
repo->uri);
218219
return -EINVAL;
219220
}
220-
xbps_error_printf("failed to read repository metadata: %s: %s\n",
221-
repo->uri, strerror(-r));
221+
xbps_error_printf(
222+
"failed to read repository metadata: %s: %s\n", repo->uri,
223+
strerror(-r));
222224
return r;
223225
}
224226

227+
repo->is_signed = true;
225228
xbps_dictionary_make_immutable(repo->idxmeta);
226229
return 0;
227230
}

0 commit comments

Comments
 (0)