summaryrefslogtreecommitdiff
path: root/src/repodata.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-03-15 14:43:00 +0100
committerMichael Schroeder <mls@suse.de>2012-03-15 14:43:00 +0100
commitb5b31f19e6682fc56978ce00dc0f797c7cd1af62 (patch)
treebcaa7b8af64a34d03a72345b826846ddadbe2e14 /src/repodata.c
parentc25eec5f8599743353a0a2d7514d8b097a7c7548 (diff)
downloadlibsolv-b5b31f19e6682fc56978ce00dc0f797c7cd1af62.tar.gz
libsolv-b5b31f19e6682fc56978ce00dc0f797c7cd1af62.tar.bz2
libsolv-b5b31f19e6682fc56978ce00dc0f797c7cd1af62.zip
- do not duplicate solvablekeys[] array
Diffstat (limited to 'src/repodata.c')
-rw-r--r--src/repodata.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/repodata.c b/src/repodata.c
index 147713e..a912842 100644
--- a/src/repodata.c
+++ b/src/repodata.c
@@ -986,22 +986,6 @@ repodata_setpos_kv(Repodata *data, KeyValue *kv)
* data iterator functions
*/
-static Repokey solvablekeys[RPM_RPMDBID - SOLVABLE_NAME + 1] = {
- { SOLVABLE_NAME, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_ARCH, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_EVR, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_VENDOR, REPOKEY_TYPE_ID, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_PROVIDES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_OBSOLETES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_CONFLICTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_REQUIRES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_RECOMMENDS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_SUGGESTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_SUPPLEMENTS, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { SOLVABLE_ENHANCES, REPOKEY_TYPE_IDARRAY, 0, KEY_STORAGE_SOLVABLE },
- { RPM_RPMDBID, REPOKEY_TYPE_U32, 0, KEY_STORAGE_SOLVABLE },
-};
-
static inline Id *
solvabledata_fetch(Solvable *s, KeyValue *kv, Id keyname)
{
@@ -1376,7 +1360,9 @@ dataiterator_step(Dataiterator *di)
di->repodataid = 1; /* reset repodata iterator */
if (di->solvid > 0 && !(di->flags & SEARCH_NO_STORAGE_SOLVABLE) && (!di->keyname || (di->keyname >= SOLVABLE_NAME && di->keyname <= RPM_RPMDBID)) && di->nparents - di->rootlevel == di->nkeynames)
{
- di->key = solvablekeys + (di->keyname ? di->keyname - SOLVABLE_NAME : 0);
+ extern Repokey repo_solvablekeys[RPM_RPMDBID - SOLVABLE_NAME + 1];
+
+ di->key = repo_solvablekeys + (di->keyname ? di->keyname - SOLVABLE_NAME : 0);
di->data = 0;
goto di_entersolvablekey;
}