summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-10-30 14:50:04 +1000
committerDan McGee <dan@archlinux.org>2010-12-12 20:25:35 -0600
commita44c7b8956f1f445d554a742870c72ca7dacaae5 (patch)
tree2aac82946032108b1f9e8910c8e1b0d05d080721 /lib/libalpm
parent889c260cbf6cf497169ca9b75df121d04140441d (diff)
downloadpacman-a44c7b8956f1f445d554a742870c72ca7dacaae5.tar.xz
Combine reading from depends and desc in sync db
This will allow us to eventually combine the depends and desc entries within the sync database. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_sync.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 851d7b83..bd8d132d 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -239,7 +239,7 @@ int _alpm_sync_db_read(pmdb_t *db, struct archive *archive, struct archive_entry
return(-1);
}
- if(strcmp(filename, "desc") == 0) {
+ if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0) {
while(_alpm_archive_fgets(line, sizeof(line), archive) != NULL) {
_alpm_strtrim(line);
if(strcmp(line, "%NAME%") == 0) {
@@ -354,12 +354,7 @@ int _alpm_sync_db_read(pmdb_t *db, struct archive *archive, struct archive_entry
if(!pkg->epoch) {
pkg->epoch = 1;
}
- }
- }
- } else if(strcmp(filename, "depends") == 0) {
- while(_alpm_archive_fgets(line, sizeof(line), archive) != NULL) {
- _alpm_strtrim(line);
- if(strcmp(line, "%DEPENDS%") == 0) {
+ } else if(strcmp(line, "%DEPENDS%") == 0) {
while(_alpm_archive_fgets(line, sizeof(line), archive) &&
strlen(_alpm_strtrim(line))) {
pmdepend_t *dep = _alpm_splitdep(_alpm_strtrim(line));