int rpmheadsize = 0;
FILE *fp;
unsigned char lead[4096];
+ int headerstart, headerend;
if (nrpms <= 0)
return;
}
sigdsize += sigcnt * 16;
sigdsize = (sigdsize + 7) & ~7;
+ headerstart = 96 + 16 + sigdsize;
while (sigdsize)
{
l = sigdsize > 4096 ? 4096 : sigdsize;
continue;
}
l = sigdsize + sigcnt * 16;
+ headerend = headerstart + 16 + l;
if (l > rpmheadsize)
rpmhead = sat_realloc(rpmhead, sizeof(*rpmhead) + l);
if (fread(rpmhead->data, l, 1, fp) != 1)
s = pool_id2solvable(pool, repo_add_solvable(repo));
rpm2solv(pool, repo, repodata, s, rpmhead);
add_location(repodata, s, rpms[i]);
+ if (repodata)
+ repodata_set_num(repodata, (s - pool->solvables) - repodata->start, SOLVABLE_HEADEREND, headerend);
}
if (rpmhead)
sat_free(rpmhead);
Repo *repo;
FILE *fp;
char buf[4096], *p;
+ const char *basefile = 0;
- while ((c = getopt(argc, argv, "m:")) >= 0)
+ while ((c = getopt(argc, argv, "b:m:")) >= 0)
{
switch(c)
{
+ case 'b':
+ basefile = optarg;
+ break;
case 'm':
manifest = optarg;
break;
}
repo = repo_create(pool, "rpms2solv");
repo_add_rpms(repo, rpms, nrpms);
- tool_write(repo, 0, 0);
+ tool_write(repo, basefile, 0);
pool_free(pool);
for (c = 0; c < nrpms; c++)
free((char *)rpms[c]);