#if defined(ENABLE_RPMDB) && (defined(SUSE) || defined(FEDORA))
# if defined(ENABLE_SUSEREPO) && defined(PRODUCTS_PATH)
- if (repo_add_products(repo, PRODUCTS_PATH, REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
+ if (repo_add_products(repo, PRODUCTS_PATH, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
{
fprintf(stderr, "product reading failed: %s\n", pool_errstr(pool));
exit(1);
}
# endif
# if defined(ENABLE_APPDATA)
- if (repo_add_appdata_dir(repo, APPDATA_PATH, REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
+ if (repo_add_appdata_dir(repo, APPDATA_PATH, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
{
fprintf(stderr, "appdata reading failed: %s\n", pool_errstr(pool));
exit(1);
}
# endif
ofp = fopen(calccachepath(repo, 0, 0), "r");
- if (repo_add_rpmdb_reffp(repo, ofp, REPO_REUSE_REPODATA | REPO_USE_ROOTDIR))
+ if (repo_add_rpmdb_reffp(repo, ofp, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
{
fprintf(stderr, "installed db: %s\n", pool_errstr(pool));
exit(1);
fclose(ofp);
#endif
#if defined(ENABLE_DEBIAN) && defined(DEBIAN)
- if (repo_add_debdb(repo, REPO_REUSE_REPODATA | REPO_USE_ROOTDIR))
+ if (repo_add_debdb(repo, REPO_REUSE_REPODATA | REPO_NO_INTERNALIZE | REPO_USE_ROOTDIR))
{
fprintf(stderr, "installed db: %s\n", pool_errstr(pool));
exit(1);
}
#endif
+ repo_internalize(repo);
writecachedrepo(repo, 0, 0, installedcookie);
}
pool_set_installed(pool, repo);
queue_init(&repofilter);
queue_init(&kindfilter);
queue_init(&archfilter);
- while (argc > 2)
+ while (argc > 1)
{
- if (!strcmp(argv[1], "-r") || !strcmp(argv[1], "--repo"))
+ if (!strcmp(argv[1], "-i"))
+ {
+ queue_push2(&repofilter, SOLVER_SOLVABLE_REPO | SOLVER_SETREPO, pool->installed->repoid);
+ argc--;
+ argv++;
+ }
+ else if (argc > 2 && (!strcmp(argv[1], "-r") || !strcmp(argv[1], "--repo")))
{
const char *rname = argv[2], *rp;
Id repoid = 0;
argc -= 2;
argv += 2;
}
- else if (!strcmp(argv[1], "--arch"))
+ else if (argc > 2 && !strcmp(argv[1], "--arch"))
{
if (!strcmp(argv[2], "src") || !strcmp(argv[2], "nosrc"))
archfilter_src = 1;
argc -= 2;
argv += 2;
}
- else if (!strcmp(argv[1], "-t") || !strcmp(argv[1], "--type"))
+ else if (argc > 2 && (!strcmp(argv[1], "-t") || !strcmp(argv[1], "--type")))
{
const char *kind = argv[2];
if (!strcmp(kind, "srcpackage"))