summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2010-06-01 18:05:35 +0200
committerMichael Schroeder <mls@suse.de>2010-06-01 18:05:35 +0200
commite362e8eb31ade170f6b02822e77db5b5a0f057ca (patch)
tree480f3470420f4df6dd36b631da72e043ea6dc1ab /ext
parent9568238828422a65bf3325693c7dc993e91060e5 (diff)
downloadlibsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.tar.gz
libsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.tar.bz2
libsolv-e362e8eb31ade170f6b02822e77db5b5a0f057ca.zip
- work around debian obsoletes handling for now
- make solv run on debian, too
Diffstat (limited to 'ext')
-rw-r--r--ext/CMakeLists.txt8
-rw-r--r--ext/repo_deb.c24
2 files changed, 30 insertions, 2 deletions
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index c6bd1bc..8df2339 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -1,8 +1,12 @@
SET(libsatsolverext_SRCS
- pool_fileconflicts.c repo_content.c repo_deltainfoxml.c repo_helix.c repo_products.c
- repo_releasefile_products.c repo_repomdxml.c repo_rpmdb.c repo_rpmmd.c
+ repo_content.c repo_deltainfoxml.c repo_helix.c repo_products.c
+ repo_releasefile_products.c repo_repomdxml.c repo_rpmmd.c
repo_susetags.c repo_updateinfoxml.c repo_write.c repo_zyppdb.c
repo_deb.c)
+IF ( NOT DEBIAN )
+SET(libsatsolverext_SRCS
+ ${libsatsolverext_SRCS} pool_fileconflicts.c repo_rpmdb.c)
+ENDIF (NOT DEBIAN)
ADD_LIBRARY(satsolverext STATIC ${libsatsolverext_SRCS})
diff --git a/ext/repo_deb.c b/ext/repo_deb.c
index 6d3d64b..6e18acb 100644
--- a/ext/repo_deb.c
+++ b/ext/repo_deb.c
@@ -239,6 +239,10 @@ control2solvable(Solvable *s, Repodata *data, char *control)
if (!strcasecmp(tag, "enhances"))
s->enhances = makedeps(repo, q, s->enhances, 0);
break;
+ case 'F' << 8 | 'I':
+ if (!strcasecmp(tag, "filename"))
+ repodata_set_location(data, s - pool->solvables, 0, 0, q);
+ break;
case 'H' << 8 | 'O':
if (!strcasecmp(tag, "homepage"))
repodata_set_str(data, s - pool->solvables, SOLVABLE_URL, q);
@@ -299,6 +303,26 @@ control2solvable(Solvable *s, Repodata *data, char *control)
s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
if (s->name && !havesource)
repodata_set_void(data, s - pool->solvables, SOLVABLE_SOURCENAME);
+ if (s->obsoletes)
+ {
+ /* obsoletes only count when the packages also conflict */
+ int i, j, k;
+ Id d;
+ for (i = j = s->obsoletes; (d = repo->idarraydata[i]) != 0; i++)
+ {
+ if (s->conflicts)
+ {
+ for (k = s->conflicts; repo->idarraydata[k] != 0; k++)
+ if (repo->idarraydata[k] == d)
+ break;
+ if (repo->idarraydata[k])
+ {
+ repo->idarraydata[j++] = d;
+ }
+ }
+ }
+ repo->idarraydata[j] = 0;
+ }
}
void