mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
Make reading from any file possible in sync DB
Whether it be "desc", "depends", or "deltas", it really doesn't matter-
treat them all the same and have the ability to read any data from any file
in that list. This continues the work in a44c7b8956
.
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
9f96c5433a
commit
3030542d10
@ -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,12 +381,7 @@ 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) {
|
||||
} 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user