- add static noise
authorMichael Schroeder <mls@suse.de>
Fri, 15 Feb 2008 19:01:09 +0000 (19:01 +0000)
committerMichael Schroeder <mls@suse.de>
Fri, 15 Feb 2008 19:01:09 +0000 (19:01 +0000)
- add id_filelist
- dump DIRSTRARRAY type

tools/dumpsolv.c
tools/repo_write.c
tools/tools_util.h

index 43fd65d..37bed03 100644 (file)
@@ -169,6 +169,11 @@ dump_repoattrs_cb(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, KeyV
       printdir(data, kv->id);
       printf(" %d %d\n", kv->num, kv->num2);
       break;
+    case TYPE_DIRSTRARRAY:
+      printf("%s: ", keyname);
+      printdir(data, kv->id);
+      printf("/%s\n", kv->str);
+      break;
     default:
       printf("%s: ?\n", keyname);
       break;
index 42c6ad6..9dee98d 100644 (file)
@@ -398,7 +398,7 @@ struct cbdata {
 #define SCHEMATADATA_BLOCK 255
 #define EXTDATA_BLOCK 1023
 
-void
+static void
 data_addid(struct extdata *xd, Id x)
 {
   unsigned char *dp;
@@ -419,7 +419,7 @@ data_addid(struct extdata *xd, Id x)
   xd->len = dp - xd->buf;
 }
 
-void
+static void
 data_addideof(struct extdata *xd, Id x, int eof)
 {
   if (x >= 64)
@@ -427,7 +427,7 @@ data_addideof(struct extdata *xd, Id x, int eof)
   data_addid(xd, (eof ? x: x | 64));
 }
 
-void
+static void
 data_addblob(struct extdata *xd, unsigned char *blob, int len)
 {
   xd->buf = sat_extend(xd->buf, xd->len, len, 1, EXTDATA_BLOCK);
@@ -494,7 +494,7 @@ putinownpool(struct cbdata *cbdata, Stringpool *ss, Id id)
   return id;
 }
 
-Id
+static Id
 putinowndirpool(struct cbdata *cbdata, Repodata *data, Dirpool *dp, Id dir)
 {
   Id compid, parent;
@@ -528,7 +528,7 @@ setdirused(struct cbdata *cbdata, Dirpool *dp, Id dir)
   cbdata->dirused[0] = 2;
 }
 
-int
+static int
 repo_write_cb_needed(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, KeyValue *kv)
 {
   struct cbdata *cbdata = vcbdata;
@@ -555,6 +555,7 @@ repo_write_cb_needed(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, K
        break;
       case TYPE_DIR:
       case TYPE_DIRNUMNUMARRAY:
+      case TYPE_DIRSTRARRAY:
        id = kv->id;
        if (cbdata->owndirpool)
          putinowndirpool(cbdata, data, &data->dirpool, id);
@@ -567,7 +568,7 @@ repo_write_cb_needed(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, K
   return 0;
 }
 
-int
+static int
 repo_write_cb_sizes(void *vcbdata, Solvable *s, Repodata *data, Repokey *key, KeyValue *kv)
 {
   struct cbdata *cbdata = vcbdata;
@@ -901,7 +902,7 @@ repo_write(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void
          repodataused[i] = 1;
          if (key->type != TYPE_STR && key->type != TYPE_U32)
            idused = 1;
-         if (key->type == TYPE_DIR || key->type == TYPE_DIRNUMNUMARRAY)
+         if (key->type == TYPE_DIR || key->type == TYPE_DIRNUMNUMARRAY || key->type == TYPE_DIRSTRARRAY)
            dirused = 1;
        }
       if (idused)
index 7689b71..a7f30e2 100644 (file)
@@ -154,6 +154,7 @@ static Id id_nosource;
 static Id id_source;
 static Id id_sourceid;
 static Id id_time;
+static Id id_filelist;
 
 /* resobject */
 static Id id_summary;
@@ -200,6 +201,7 @@ static void init_attr_ids(Pool *pool)
   id_source = str2id(pool, "source", 1);
   id_sourceid = str2id(pool, "sourceid", 1);
   id_time = str2id(pool, "time", 1);
+  id_filelist = str2id(pool, "filelist", 1);
 
   id_isvisible = str2id(pool, "isvisible", 1);