index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2010-12-12 20:38:20 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 20:38:20 -0600 |
commit | 3030542d10d4e87997a894a9eb63122cd2426a94 (patch) | |
tree | 0322ec612e448905258dd9ddc07d1a7855601121 /lib/libalpm | |
parent | 9f96c5433a4867cce9dc0c3ff23cb3ba8029be20 (diff) |
-rw-r--r-- | lib/libalpm/be_sync.c | 20 |
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index b6c99372..f708b16d 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -238,7 +238,8 @@ int _alpm_sync_db_read(pmdb_t *db, struct archive *archive, struct archive_entry return(-1); } - if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0) { + if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0 + || strcmp(filename, "deltas") == 0) { while(_alpm_archive_fgets(line, sizeof(line), archive) != NULL) { _alpm_strtrim(line); if(strcmp(line, "%NAME%") == 0) { @@ -380,19 +381,14 @@ int _alpm_sync_db_read(pmdb_t *db, struct archive *archive, struct archive_entry STRDUP(linedup, _alpm_strtrim(line), goto error); pkg->provides = alpm_list_add(pkg->provides, linedup); } - } - } - } else if(strcmp(filename, "deltas") == 0) { - while(_alpm_archive_fgets(line, sizeof(line), archive) != NULL) { - _alpm_strtrim(line); - if(strcmp(line, "%DELTAS%") == 0) { - while(_alpm_archive_fgets(line, sizeof(line), archive) && strlen(_alpm_strtrim(line))) { - pmdelta_t *delta = _alpm_delta_parse(line); - if(delta) { - pkg->deltas = alpm_list_add(pkg->deltas, delta); - } + } else if(strcmp(line, "%DELTAS%") == 0) { + while(_alpm_archive_fgets(line, sizeof(line), archive) && strlen(_alpm_strtrim(line))) { + pmdelta_t *delta = _alpm_delta_parse(line); + if(delta) { + pkg->deltas = alpm_list_add(pkg->deltas, delta); } } + } } } else { /* unknown database file */ |