Store pattern order, includes, extends, category and icon as attributes.
authorMichael Matz <matz@suse.de>
Wed, 19 Mar 2008 19:06:29 +0000 (19:06 +0000)
committerMichael Matz <matz@suse.de>
Wed, 19 Mar 2008 19:06:29 +0000 (19:06 +0000)
Change keywords to use an IDARRAY (not only one ID).

tools/repo_susetags.c
tools/susetags2solv.c

index 0f785c4..4a417d7 100644 (file)
@@ -757,7 +757,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla
            }
            continue;
           case CTAG('=', 'K', 'w', 'd'):
-           repodata_set_poolstr(data, last_found_pack, SOLVABLE_KEYWORDS, line + 6);
+           repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_KEYWORDS, line + 6);
            continue;
           case CTAG('=', 'A', 'u', 't'):
            repodata_set_str(data, last_found_pack, SOLVABLE_AUTHORS, line + 6);
@@ -803,6 +803,27 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *language, int fla
          case CTAG('=', 'D', 'i', 'r'):
            add_dirline (&pd, line + 6);
            continue;
+         case CTAG('=', 'C', 'a', 't'):
+           repodata_set_poolstr(data, last_found_pack, SOLVABLE_CATEGORY, line + 6);
+           break;
+         case CTAG('=', 'O', 'r', 'd'):
+           /* Order is a string not a number, so we can retroactively insert
+              new patterns in the middle, i.e. 1 < 15 < 2.  */
+           repodata_set_str(data, last_found_pack, SOLVABLE_ORDER, line + 6);
+           break;
+         case CTAG('=', 'I', 'c', 'o'):
+           repodata_set_str(data, last_found_pack, SOLVABLE_ICON, line + 6);
+           break;
+         case CTAG('=', 'E', 'x', 't'):
+           repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_EXTENDS, line + 6);
+           break;
+         case CTAG('=', 'I', 'n', 'c'):
+           repodata_add_poolstr_array(data, last_found_pack, SOLVABLE_INCLUDES, line + 6);
+           break;
+
+         case CTAG('=', 'P', 'a', 't'):
+         case CTAG('=', 'P', 'k', 'g'):
+           break;
 
          default:
            break;
index ae2c1e1..e383276 100644 (file)
@@ -33,7 +33,7 @@ usage(int status)
           "  -d <descrdir> : do not read from stdin, but use data in descrdir\n"
          "  -h : print help & exit\n"
          "  -k : don't mix kinds (experimental!)\n"
-         "  -b <base>: save fas multiple files starting with <base>\n"
+         "  -b <base>: save as multiple files starting with <base>\n"
          "  -n <name>: save attributes as <name>.attr\n"
         );
    exit(status);