]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- add support for the package's URL [bnc#402434]
authorMichael Schroeder <mls@suse.de>
Fri, 27 Jun 2008 13:50:38 +0000 (13:50 +0000)
committerMichael Schroeder <mls@suse.de>
Fri, 27 Jun 2008 13:50:38 +0000 (13:50 +0000)
- unset CDPATH in repo2solv.sh [bnc#402597]

src/knownid.h
tools/repo2solv.sh
tools/repo_rpmdb.c
tools/repo_rpmmd.c

index 06bb43535d58626bf084e9499b9f12e03aeaf941..45fe4593b27ef12c166022df7cbe78b44a89e4a1 100644 (file)
  *
  */
 
+/*
+ * Warning: you're free to append new entries, but insert/delete breaks
+ * the ABI!
+ */
+
 #undef KNOWNID
 #ifdef KNOWNID_INITIALIZE
 # define KNOWNID(a, b) b
@@ -82,6 +87,7 @@ KNOWNID(SOLVABLE_SUMMARY,             "solvable:summary"),
 KNOWNID(SOLVABLE_DESCRIPTION,          "solvable:description"),
 KNOWNID(SOLVABLE_AUTHORS,              "solvable:authors"),
 KNOWNID(SOLVABLE_GROUP,                        "solvable:group"),
+KNOWNID(SOLVABLE_URL,                  "solvable:url"),
 KNOWNID(SOLVABLE_KEYWORDS,             "solvable:keywords"),
 KNOWNID(SOLVABLE_LICENSE,              "solvable:license"),
 KNOWNID(SOLVABLE_BUILDTIME,            "solvable:buildtime"),
index 7e3421e4c67335bd70a3e7fc5e4c98631efdf4ef..25862d4a9c3f3e12f097fb3cebc9523013e1da12 100755 (executable)
@@ -21,6 +21,7 @@ test_susetags() {
 set -e 
 
 LANG=C
+unset CDPATH
 parser_options=${PARSER_OPTIONS:-}
 
 
index a432390f5e34575ad98cc40a24080a711dfbc89e..00e9f8a2e72b1dd1a3380a74ad18a6699ecd136a 100644 (file)
@@ -30,7 +30,7 @@
 #include "util.h"
 #include "repo_rpmdb.h"
 
-#define RPMDB_COOKIE_VERSION 1
+#define RPMDB_COOKIE_VERSION 2
 
 #define TAG_NAME               1000
 #define TAG_VERSION            1001
@@ -44,6 +44,7 @@
 #define TAG_VENDOR             1011
 #define TAG_LICENSE            1014
 #define TAG_GROUP              1016
+#define TAG_URL                        1020
 #define TAG_ARCH               1022
 #define TAG_FILESIZES          1028
 #define TAG_FILEMODES          1030
@@ -896,6 +897,9 @@ rpm2solv(Pool *pool, Repo *repo, Repodata *repodata, Solvable *s, RpmHead *rpmhe
       str = headstring(rpmhead, TAG_LICENSE);
       if (str)
         repodata_set_poolstr(repodata, handle, SOLVABLE_LICENSE, str);
+      str = headstring(rpmhead, TAG_URL);
+      if (str)
+       repodata_set_str(repodata, handle, SOLVABLE_URL, str);
       u32 = headint32(rpmhead, TAG_BUILDTIME);
       if (u32)
         repodata_set_num(repodata, handle, SOLVABLE_BUILDTIME, u32);
index 3a843a2de0b4cbfbf87f1a57a2d34d59c4fd33cb..9ca3ac9af72f6577b7dc454c2e3c23282c74188a 100644 (file)
@@ -39,6 +39,7 @@ enum state {
   /* resobject attributes */
   STATE_SUMMARY,
   STATE_DESCRIPTION,
+  STATE_URL,
   STATE_INSNOTIFY,
   STATE_DELNOTIFY,
   STATE_VENDOR,
@@ -147,6 +148,7 @@ static struct stateswitch stateswitches[] = {
 
   { STATE_SOLVABLE,    "summary",         STATE_SUMMARY, 1 },
   { STATE_SOLVABLE,    "description",     STATE_DESCRIPTION, 1 },
+  { STATE_SOLVABLE,    "url",             STATE_URL, 1 },
   //{ STATE_SOLVABLE,    "???",         STATE_INSNOTIFY, 1 },
   //{ STATE_SOLVABLE,    "??",     STATE_DELNOTIFY, 1 },
   { STATE_SOLVABLE,    "vendor",          STATE_VENDOR, 1 },
@@ -833,6 +835,10 @@ endElement(void *userData, const char *name)
       pd->lang = 0;
       set_desciption_author(pd->data, handle, pd->content);
       break;
+    case STATE_URL:
+      if (pd->content[0])
+       repodata_set_str(pd->data, handle, SOLVABLE_URL, pd->content);
+      break;
     case STATE_SOURCERPM:
       set_sourcerpm(pd->data, s, handle, pd->content);
       break;