From: Michael Schroeder Date: Tue, 30 Oct 2012 10:39:41 +0000 (+0100) Subject: use susetags data dir for susetags deltas X-Git-Tag: BASE-SuSE-Code-12_3-Branch~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f717c3042cbdd4aed790c4e3dec7a2a10eae2247;p=thirdparty%2Flibsolv.git use susetags data dir for susetags deltas --- diff --git a/examples/pysolv b/examples/pysolv index b6e7710a..238e3e80 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -881,6 +881,7 @@ if cmd == 'install' or cmd == 'erase' or cmd == 'up' or cmd == 'dup' or cmd == ' if not chksum: continue dloc = dp.lookup_str(solv.DELTA_LOCATION_DIR) + '/' + dp.lookup_str(solv.DELTA_LOCATION_NAME) + '-' + dp.lookup_str(solv.DELTA_LOCATION_EVR) + '.' + dp.lookup_str(solv.DELTA_LOCATION_SUFFIX) + dloc = repo.packagespath() + dloc f = repo.download(dloc, False, chksum) if not f: continue diff --git a/examples/solv.c b/examples/solv.c index 139529f9..1128c2d4 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -1048,7 +1048,7 @@ calc_checksum_fp(FILE *fp, Id chktype, unsigned char *out) } void -calc_checksum_stat(struct stat *stb, Id chktype, unsigned *cookie, unsigned char *out) +calc_checksum_stat(struct stat *stb, Id chktype, unsigned char *cookie, unsigned char *out) { void *h = solv_chksum_create(chktype); solv_chksum_add(h, CHKSUM_IDENT, strlen(CHKSUM_IDENT)); @@ -3029,6 +3029,11 @@ rerunsolver: dloc = pool_tmpappend(pool, dloc, "/", pool_lookup_str(pool, SOLVID_POS, DELTA_LOCATION_NAME)); dloc = pool_tmpappend(pool, dloc, "-", pool_lookup_str(pool, SOLVID_POS, DELTA_LOCATION_EVR)); dloc = pool_tmpappend(pool, dloc, ".", pool_lookup_str(pool, SOLVID_POS, DELTA_LOCATION_SUFFIX)); + if (cinfo->type == TYPE_SUSETAGS) + { + const char *datadir = repo_lookup_str(cinfo->repo, SOLVID_META, SUSETAGS_DATADIR); + dloc = pool_tmpjoin(pool, datadir ? datadir : "suse", "/", dloc); + } if ((fp = curlfopen(cinfo, dloc, 0, chksum, chksumtype, 0)) == 0) continue; /* got it, now reconstruct */