susetags2solv always constructs attributes now, by default into the main
authorMichael Matz <matz@suse.de>
Fri, 15 Feb 2008 09:58:43 +0000 (09:58 +0000)
committerMichael Matz <matz@suse.de>
Fri, 15 Feb 2008 09:58:43 +0000 (09:58 +0000)
SOLV file.

tools/repo2solv.sh
tools/repo_susetags.c
tools/repo_susetags.h
tools/susetags2solv.c

index c12f604..1e7da83 100755 (executable)
@@ -89,6 +89,6 @@ elif test -d suse/setup/descr && test -s content; then
        esac
       done
     fi
-  ) | susetags2solv -a -c "${olddir}/content"
+  ) | susetags2solv -c "${olddir}/content"
   cd "$olddir"
 fi
index 7f25973..f1d81d7 100644 (file)
@@ -369,7 +369,7 @@ tag_from_string (char *cs)
  */
 
 void
-repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname)
+repo_add_susetags(Repo *repo, FILE *fp, Id vendor)
 {
   Pool *pool = repo->pool;
   char *line, *linep;
@@ -383,11 +383,8 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname)
   struct parsedata pd;
   Repodata *data = 0;
 
-  if (attrname)
-    {
-      data = repo_add_repodata(repo);
-      init_attr_ids(pool);
-    }
+  data = repo_add_repodata(repo);
+  init_attr_ids(pool);
 
   memset(&pd, 0, sizeof(pd));
   line = malloc(1024);
@@ -615,11 +612,8 @@ repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname)
            last_found_pack = 0;
            indesc++;
            continue;
-       }
-      if (!attrname)
-        continue;
-      switch (tag)
-        {
+
+        /* From here it's the attribute tags.  */
           case CTAG('=', 'G', 'r', 'p'):
            repodata_set_poolstr(data, last_found_pack, id_group, line + 6);
            continue;
index 44dba8d..432ca8f 100644 (file)
@@ -9,4 +9,4 @@
  * if <attrname> given, write attributes as '<attrname>.attr'
  */
 
-extern void repo_add_susetags(Repo *repo, FILE *fp, Id vendor, const char *attrname);
+extern void repo_add_susetags(Repo *repo, FILE *fp, Id vendor);
index 5446a11..434687f 100644 (file)
@@ -50,10 +50,6 @@ main(int argc, char **argv)
           switch (*s++)
            {
              case 'h': usage(NULL); break;
-             case 'a':
-               if (attrname == NULL)
-                 attrname = "test.attr";
-             break;
              case 'n':
                if (argc)
                  {
@@ -106,7 +102,7 @@ main(int argc, char **argv)
        attrname = newname;
       }
     }
-  repo_add_susetags(repo, stdin, vendor, attrname);
+  repo_add_susetags(repo, stdin, vendor);
   tool_write(repo, 0, attrname);
   pool_free(pool);
   exit(0);