]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
use susetags data dir for susetags deltas
authorMichael Schroeder <mls@suse.de>
Tue, 30 Oct 2012 10:39:41 +0000 (11:39 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 30 Oct 2012 10:39:41 +0000 (11:39 +0100)
examples/pysolv
examples/solv.c

index b6e7710abe313299f1e4a95e14f25ecdf4ad187d..238e3e80ff7ad3f611c034c2108f5f0bdbf5a3f3 100755 (executable)
@@ -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
index 139529f908d2610e8eeb41f149b740813bc791ab..1128c2d4fb8652608c6c84a816e3aa5372abb096 100644 (file)
@@ -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 */