projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1e903a
)
- work around rpm bug when --prefix is used (fixes #565525)
author
Michael Schroeder
<mls@suse.de>
Fri, 18 Dec 2009 18:19:29 +0000
(19:19 +0100)
committer
Michael Schroeder
<mls@suse.de>
Fri, 18 Dec 2009 18:19:29 +0000
(19:19 +0100)
ext/repo_rpmdb.c
patch
|
blob
|
history
diff --git
a/ext/repo_rpmdb.c
b/ext/repo_rpmdb.c
index
ee3626b
..
50c8a39
100644
(file)
--- a/
ext/repo_rpmdb.c
+++ b/
ext/repo_rpmdb.c
@@
-530,7
+530,7
@@
static struct filefilter filefilters[] = {
#endif
static void
#endif
static void
-adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead, char **dn, unsigned int *di, int fc, int d
i
c)
+adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead, char **dn, unsigned int *di, int fc, int dc)
{
Id handle, did;
int i, fszc;
{
Id handle, did;
int i, fszc;
@@
-627,11
+627,11
@@
adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead,
sat_free(fdev);
}
sat_free(fino);
sat_free(fdev);
}
sat_free(fino);
- fn = sat_calloc(d
i
c, sizeof(unsigned int));
- fkb = sat_calloc(d
i
c, sizeof(unsigned int));
+ fn = sat_calloc(dc, sizeof(unsigned int));
+ fkb = sat_calloc(dc, sizeof(unsigned int));
for (i = 0; i < fc; i++)
{
for (i = 0; i < fc; i++)
{
- if (di[i] >= d
i
c)
+ if (di[i] >= dc)
continue;
fn[di[i]]++;
if (fsz[i] == 0 || !S_ISREG(fm[i]))
continue;
fn[di[i]]++;
if (fsz[i] == 0 || !S_ISREG(fm[i]))
@@
-642,12
+642,17
@@
adddudata(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rpmhead,
sat_free(fm);
/* commit */
handle = s - pool->solvables;
sat_free(fm);
/* commit */
handle = s - pool->solvables;
- for (i = 0; i <
f
c; i++)
+ for (i = 0; i <
d
c; i++)
{
if (!fn[i])
continue;
{
if (!fn[i])
continue;
- if (!*dn[i] && (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC))
- did = repodata_str2dir(data, "/usr/src", 1);
+ if (!*dn[i])
+ {
+ if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC)
+ did = repodata_str2dir(data, "/usr/src", 1);
+ else
+ continue; /* work around rpm bug */
+ }
else
did = repodata_str2dir(data, dn[i], 1);
repodata_add_dirnumnum(data, handle, SOLVABLE_DISKUSAGE, did, fkb[i], fn[i]);
else
did = repodata_str2dir(data, dn[i], 1);
repodata_add_dirnumnum(data, handle, SOLVABLE_DISKUSAGE, did, fkb[i], fn[i]);
@@
-699,7
+704,7
@@
addfileprovides(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rp
}
if (data)
}
if (data)
- adddudata(pool, repo, data, s, rpmhead, dn, di, bnc, d
i
c);
+ adddudata(pool, repo, data, s, rpmhead, dn, di, bnc, d
n
c);
for (i = 0; i < bnc; i++)
{
for (i = 0; i < bnc; i++)
{
@@
-750,11
+755,17
@@
addfileprovides(Pool *pool, Repo *repo, Repodata *data, Solvable *s, RpmHead *rp
if (data)
{
Id handle, did;
if (data)
{
Id handle, did;
+ char *b = bn[i];
+
handle = s - pool->solvables;
did = repodata_str2dir(data, dn[di[i]], 1);
if (!did)
handle = s - pool->solvables;
did = repodata_str2dir(data, dn[di[i]], 1);
if (!did)
- did = repodata_str2dir(data, "/", 1);
- repodata_add_dirstr(data, handle, SOLVABLE_FILELIST, did, bn[i]);
+ {
+ did = repodata_str2dir(data, "/", 1);
+ if (b && b[0] == '/')
+ b++; /* work around rpm bug */
+ }
+ repodata_add_dirstr(data, handle, SOLVABLE_FILELIST, did, b);
}
}
#if 0
}
}
#if 0