static const int REPO_LOCALPOOL = REPO_LOCALPOOL;
static const int REPO_USE_LOADING = REPO_USE_LOADING;
static const int REPO_EXTEND_SOLVABLES = REPO_EXTEND_SOLVABLES;
- static const int REPO_USE_ROOTDIR = REPO_USE_ROOTDIR;
+ static const int REPO_USE_ROOTDIR = REPO_USE_ROOTDIR;
+ static const int REPO_NO_LOCATION = REPO_NO_LOCATION;
static const int SOLV_ADD_NO_STUBS = SOLV_ADD_NO_STUBS; /* repo_solv */
#ifdef ENABLE_SUSEREPO
static const int SUSETAGS_RECORD_SHARES = SUSETAGS_RECORD_SHARES; /* repo_susetags */
if (!s->evr)
s->evr = ID_EMPTY;
s->provides = repo_addid_dep(repo, s->provides, pool_rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
- repodata_set_location(data, s - pool->solvables, 0, 0, fn);
- repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
+ if (!(flags & REPO_NO_LOCATION))
+ repodata_set_location(data, s - pool->solvables, 0, 0, fn);
+ if (S_ISREG(stb.st_mode))
+ repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
if (pkgidhandle)
{
unsigned char pkgid[16];
if (!(flags & REPO_NO_INTERNALIZE))
repodata_internalize(data);
if (flags & REPO_USE_ROOTDIR)
- solv_free(dir);
+ solv_free((char *)dir);
return 0;
}
ctar[l2] = 0;
s = pool_id2solvable(pool, repo_add_solvable(repo));
control2solvable(s, data, (char *)ctar);
- repodata_set_location(data, s - pool->solvables, 0, 0, deb);
+ if (!(flags & REPO_NO_LOCATION))
+ repodata_set_location(data, s - pool->solvables, 0, 0, deb);
if (S_ISREG(stb.st_mode))
repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
if (gotpkgid)
solv_free(rpmhead);
return 0;
}
- repodata_set_location(data, s - pool->solvables, 0, 0, rpm);
+ if (!(flags & REPO_NO_LOCATION))
+ repodata_set_location(data, s - pool->solvables, 0, 0, rpm);
if (S_ISREG(stb.st_mode))
repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
repodata_set_num(data, s - pool->solvables, SOLVABLE_HEADEREND, headerend);
repo_matchvalue;
repo_reserve_ids;
repo_search;
- repo_set_deleted;
repo_set_deparray;
repo_set_id;
repo_set_idarray;
repo_set_poolstr;
repo_set_str;
repo_sidedata_create;
+ repo_unset;
repo_write;
repo_write_filtered;
repo_write_stdkeyfilter;
repodata_set_checksum;
repodata_set_constant;
repodata_set_constantid;
- repodata_set_deleted;
- repodata_set_deleted_uninternalized;
repodata_set_deltalocation;
repodata_set_id;
repodata_set_idarray;
repodata_str2dir;
repodata_stringify;
repodata_swap_attrs;
+ repodata_unset;
+ repodata_unset_uninternalized;
repodata_write;
repodata_write_filtered;
repopagestore_compress_page;
solvable_lookup_type;
solvable_lookup_void;
solvable_selfprovidedep;
- solvable_set_deleted;
solvable_set_deparray;
solvable_set_id;
solvable_set_idarray;
solvable_trivial_installable_map;
solvable_trivial_installable_queue;
solvable_trivial_installable_repo;
+ solvable_unset;
solver_allruleinfos;
solver_calc_duchanges;
solver_calc_installsizechange;
}
void
-repo_set_deleted(Repo *repo, Id p, Id keyname)
+repo_unset(Repo *repo, Id p, Id keyname)
{
Repodata *data;
if (p >= 0)
}
}
data = repo_last_repodata(repo);
- repodata_set_deleted(data, p, keyname);
+ repodata_unset(data, p, keyname);
}
void
#define REPO_USE_LOADING (1 << 3)
#define REPO_EXTEND_SOLVABLES (1 << 4)
#define REPO_USE_ROOTDIR (1 << 5)
+#define REPO_NO_LOCATION (1 << 6)
Repodata *repo_add_repodata(Repo *repo, int flags);
Repodata *repo_id2repodata(Repo *repo, Id id);
void repo_add_deparray(Repo *repo, Id p, Id keyname, Id dep, Id marker);
void repo_set_idarray(Repo *repo, Id p, Id keyname, Queue *q);
void repo_set_deparray(Repo *repo, Id p, Id keyname, Queue *q, Id marker);
-void repo_set_deleted(Repo *repo, Id p, Id keyname);
+void repo_unset(Repo *repo, Id p, Id keyname);
void repo_internalize(Repo *repo);
void repo_disable_paging(Repo *repo);
}
void
-repodata_set_deleted_uninternalized(Repodata *data, Id solvid, Id keyname)
+repodata_unset_uninternalized(Repodata *data, Id solvid, Id keyname)
{
Id *pp, *ap, **app;
app = repodata_get_attrp(data, solvid);
/* XXX: does not work correctly, needs fix in iterators! */
void
-repodata_set_deleted(Repodata *data, Id solvid, Id keyname)
+repodata_unset(Repodata *data, Id solvid, Id keyname)
{
Repokey key;
key.name = keyname;
void repodata_add_fixarray(Repodata *data, Id solvid, Id keyname, Id ghandle);
void repodata_add_flexarray(Repodata *data, Id solvid, Id keyname, Id ghandle);
-void repodata_set_deleted(Repodata *data, Id solvid, Id keyname);
-void repodata_set_deleted_uninternalized(Repodata *data, Id solvid, Id keyname);
+void repodata_unset(Repodata *data, Id solvid, Id keyname);
+void repodata_unset_uninternalized(Repodata *data, Id solvid, Id keyname);
/*
merge/swap attributes from one solvable to another
}
void
-solvable_set_deleted(Solvable *s, Id keyname)
+solvable_unset(Solvable *s, Id keyname)
{
- repo_set_deleted(s->repo, s - s->repo->pool->solvables, keyname);
+ repo_unset(s->repo, s - s->repo->pool->solvables, keyname);
}
void solvable_add_deparray(Solvable *s, Id keyname, Id dep, Id marker);
void solvable_set_idarray(Solvable *s, Id keyname, Queue *q);
void solvable_set_deparray(Solvable *s, Id keyname, Queue *q, Id marker);
-void solvable_set_deleted(Solvable *s, Id keyname);
+void solvable_unset(Solvable *s, Id keyname);
int solvable_identical(Solvable *s1, Solvable *s2);
Id solvable_selfprovidedep(Solvable *s);