]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
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 c12f6049a6470119eb4ef602180c4bf52592b0ca..1e7da8304ec6fa76ab18aeb4d29bc17429ea999a 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 7f25973f1a977f25d5c6790ab51535d9e6efe5ec..f1d81d714223ced41ea1c824288b92881379ba4d 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 44dba8dcabc0c141f788b2b4f4720e7630846203..432ca8f07f159c0d6b1691aa1d3fb1979e7e0471 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 5446a1186c4821dac0d7662ea6388169d19d92a9..434687fe4c8b5a494b9c8f4a95d5f7a4554d1f48 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);