Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-10-11 14:57:16 +1000
committerAllan McRae <allan@archlinux.org>2010-10-14 13:17:40 +1000
commitd39248120e4b30e56fe052dcf5973e16e482975e (patch)
tree1cda0fe491a192bc414a9f230190d20f1b4e4383 /lib/libalpm/be_local.c
parente464339e3bd37e9bdb2c8d13fa29408a1123f620 (diff)
Remove lazy loading of deltas
Local packages do not have deltas so remove lazy loading of delta information. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index abf0af4e..af4a220a 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -196,7 +196,8 @@ alpm_list_t *_cache_get_replaces(pmpkg_t *pkg)
alpm_list_t *_cache_get_deltas(pmpkg_t *pkg)
{
- LAZY_LOAD(INFRQ_DELTAS, NULL);
+ ASSERT(pkg != NULL, return(NULL));
+ /* local pkgs do not have deltas so nothing to load */
return pkg->deltas;
}
@@ -704,29 +705,6 @@ int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fp = NULL;
}
- /* DELTAS */
- if(inforeq & INFRQ_DELTAS) {
- snprintf(path, PATH_MAX, "%sdeltas", pkgpath);
- if((fp = fopen(path, "r"))) {
- while(!feof(fp)) {
- if(fgets(line, sizeof(line), fp) == NULL) {
- break;
- }
- _alpm_strtrim(line);
- if(strcmp(line, "%DELTAS%") == 0) {
- while(fgets(line, sizeof(line), fp) && strlen(_alpm_strtrim(line))) {
- pmdelta_t *delta = _alpm_delta_parse(line);
- if(delta) {
- info->deltas = alpm_list_add(info->deltas, delta);
- }
- }
- }
- }
- fclose(fp);
- fp = NULL;
- }
- }
-
/* INSTALL */
if(inforeq & INFRQ_SCRIPTLET) {
snprintf(path, PATH_MAX, "%sinstall", pkgpath);