Skip to content

Commit 6c07a3f

Browse files
committed
Support reading of TYPE_DELETED keys
1 parent c1a371b commit 6c07a3f

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/repo_solv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
859859
type = idmap[type];
860860
else if ((flags & REPO_LOCALPOOL) != 0)
861861
type = pool_str2id(pool, stringpool_id2str(spool, type), 1);
862-
if (type < REPOKEY_TYPE_VOID || type > REPOKEY_TYPE_FLEXARRAY)
862+
if (type < REPOKEY_TYPE_VOID || type > REPOKEY_TYPE_DELETED)
863863
{
864864
data.error = pool_error(pool, SOLV_ERROR_UNSUPPORTED, "unsupported data type '%s'", pool_id2str(pool, type));
865865
type = REPOKEY_TYPE_VOID;

src/repo_write.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ collect_data_cb(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, KeyVal
773773
xd = cbdata->extdata + 0; /* incore buffer */
774774
switch(key->type)
775775
{
776+
case REPOKEY_TYPE_DELETED:
776777
case REPOKEY_TYPE_VOID:
777778
case REPOKEY_TYPE_CONSTANT:
778779
case REPOKEY_TYPE_CONSTANTID:

src/repopack.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ data_fetch(unsigned char *dp, KeyValue *kv, Repokey *key)
144144
switch (key->type)
145145
{
146146
case REPOKEY_TYPE_VOID:
147+
case REPOKEY_TYPE_DELETED:
147148
return dp;
148149
case REPOKEY_TYPE_CONSTANT:
149150
kv->num2 = 0;

tools/common_write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ tool_write(Repo *repo, FILE *fp)
5858
repowriter_set_keyfilter(writer, keyfilter_solv, 0);
5959
if (repowriter_write(writer, fp) != 0)
6060
{
61-
fprintf(stderr, "repo write failed\n");
61+
fprintf(stderr, "repo write failed: %s\n", pool_errstr(repo->pool));
6262
exit(1);
6363
}
6464
if (fflush(fp))

0 commit comments

Comments
 (0)