summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 49661e24..5d136c9e 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -533,6 +533,13 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
/* already loaded all of this info, do nothing */
return 0;
}
+
+ if(info->infolevel & INFRQ_ERROR) {
+ /* We've encountered an error loading this package before. Don't attempt
+ * repeated reloads, just give up. */
+ return -1;
+ }
+
_alpm_log(db->handle, ALPM_LOG_FUNCTION, "loading package data for %s : level=0x%x\n",
info->name, inforeq);
@@ -619,6 +626,7 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
}
fclose(fp);
fp = NULL;
+ info->infolevel |= INFRQ_DESC;
}
/* FILES */
@@ -673,6 +681,7 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
}
fclose(fp);
fp = NULL;
+ info->infolevel |= INFRQ_FILES;
}
/* INSTALL */
@@ -681,15 +690,14 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
if(access(path, F_OK) == 0) {
info->scriptlet = 1;
}
+ info->infolevel |= INFRQ_SCRIPTLET;
}
- /* internal */
- info->infolevel |= inforeq;
-
free(pkgpath);
return 0;
error:
+ info->infolevel |= INFRQ_ERROR;
free(pkgpath);
if(fp) {
fclose(fp);