#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <zlib.h>
#include "pool.h"
#include "evr.h"
#include "poolarch.h"
#include "repo_solv.h"
+#ifdef ENABLE_SUSEREPO
#include "repo_susetags.h"
+#endif
+#ifdef ENABLE_RPMMD
#include "repo_updateinfoxml.h"
#include "repo_rpmmd.h"
+#endif
#include "solver.h"
#include "solverdebug.h"
}
break;
case SOLVER_RULE_JOB:
+ case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
+ case SOLVER_RULE_JOB_UNKNOWN_PACKAGE:
+ case SOLVER_RULE_JOB_UNSUPPORTED:
break;
case SOLVER_RULE_RPM:
printf(" some dependency problem\n");
{
char *arch, *mypatch;
const char *pname;
- int l;
+ int l, r;
FILE *fp;
int i;
Id pid, p, pp;
int tests = 0;
context_t c;
+ static const char* langs[] = {"en"};
c.install_available = 0;
c.updatestart = 0;
arch = argv[1];
pool = pool_create();
pool_setarch(pool, arch);
- static const char* langs[] = {"en"};
pool_set_languages(pool, langs, 1);
#if 0
perror(argv[i]);
exit(1);
}
- if (l >= 8 && !strcmp(argv[i] + l - 8, "packages"))
+ r = 0;
+ if (0)
+ {
+ }
+#ifdef ENABLE_SUSEREPO
+ else if (l >= 8 && !strcmp(argv[i] + l - 8, "packages"))
{
- repo_add_susetags(c.repo, fp, 0, 0, 0);
+ r = repo_add_susetags(c.repo, fp, 0, 0, 0);
}
else if (l >= 11 && !strcmp(argv[i] + l - 11, "packages.gz"))
{
- repo_add_susetags(c.repo, fp, 0, 0, 0);
+ r = repo_add_susetags(c.repo, fp, 0, 0, 0);
}
+#endif
+#ifdef ENABLE_RPMMD
else if (l >= 14 && !strcmp(argv[i] + l - 14, "primary.xml.gz"))
{
- repo_add_rpmmd(c.repo, fp, 0, 0);
+ r = repo_add_rpmmd(c.repo, fp, 0, 0);
}
else if (l >= 17 && !strcmp(argv[i] + l - 17, "updateinfo.xml.gz"))
{
- repo_add_updateinfoxml(c.repo, fp, 0);
+ r = repo_add_updateinfoxml(c.repo, fp, 0);
}
- else if (repo_add_solv(c.repo, fp))
+#endif
+ else
+ r = repo_add_solv(c.repo, fp, 0);
+ if (r)
{
- fprintf(stderr, "could not add repo %s\n", argv[i]);
+ fprintf(stderr, "could not add repo %s: %s\n", argv[i], pool_errstr(pool));
exit(1);
}
if (fp != stdin)
for (pid = 1; pid < pool->nsolvables; pid++)
{
+ Solvable *s;
c.shown = 0;
- Solvable *s = pool->solvables + pid;
+ s = pool->solvables + pid;
if (!s->repo)
continue;
if (!pool_installable(pool, s))