summaryrefslogtreecommitdiff
path: root/ext/repo_arch.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-11-13 10:24:00 +0100
committerMichael Schroeder <mls@suse.de>2012-11-13 10:24:00 +0100
commit7c4bf2cd0b19baaf83f66782047b954ca6feeea8 (patch)
tree38dc2cea4292ef3be93a3f68690cb8bb917c8652 /ext/repo_arch.c
parentbed337587c8e10acd0a3bcd7b2d43dc747a0b290 (diff)
downloadlibsolv-7c4bf2cd0b19baaf83f66782047b954ca6feeea8.tar.gz
libsolv-7c4bf2cd0b19baaf83f66782047b954ca6feeea8.tar.bz2
libsolv-7c4bf2cd0b19baaf83f66782047b954ca6feeea8.zip
support REPO_NO_LOCATION, rename "set_deleted" to the more clear "unset"
Diffstat (limited to 'ext/repo_arch.c')
-rw-r--r--ext/repo_arch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/repo_arch.c b/ext/repo_arch.c
index 6caa487..ebf42d3 100644
--- a/ext/repo_arch.c
+++ b/ext/repo_arch.c
@@ -455,8 +455,10 @@ repo_add_arch_pkg(Repo *repo, const char *fn, int flags)
if (!s->evr)
s->evr = ID_EMPTY;
s->provides = repo_addid_dep(repo, s->provides, pool_rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
- repodata_set_location(data, s - pool->solvables, 0, 0, fn);
- repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
+ if (!(flags & REPO_NO_LOCATION))
+ repodata_set_location(data, s - pool->solvables, 0, 0, fn);
+ if (S_ISREG(stb.st_mode))
+ repodata_set_num(data, s - pool->solvables, SOLVABLE_DOWNLOADSIZE, (unsigned long long)stb.st_size);
if (pkgidhandle)
{
unsigned char pkgid[16];
@@ -852,7 +854,7 @@ repo_add_arch_local(Repo *repo, const char *dir, int flags)
if (!(flags & REPO_NO_INTERNALIZE))
repodata_internalize(data);
if (flags & REPO_USE_ROOTDIR)
- solv_free(dir);
+ solv_free((char *)dir);
return 0;
}