summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-25 18:15:25 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-25 18:15:25 +0000
commite8275fa9644181e9347e983f74b28f313103b888 (patch)
tree649389331a75ded168bc08d1d12a9ddc2a92e643 /lib/libalpm/alpm.c
parentea9e9ae22e674f73028906db7699e3e4207d4f61 (diff)
downloadpacman-e8275fa9644181e9347e983f74b28f313103b888.tar.xz
Moved downloaded db unpacking to the backend files, to easier allow conversion
from db to whatever format we need.
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index df267e31..f0798316 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -364,7 +364,7 @@ int alpm_db_update(int force, PM_DB *db)
_alpm_log(PM_LOG_ERROR, _("could not remove database entry %s/%s"), db->treename,
((pmpkg_t *)lp->data)->name);
}
- RET_ERR(PM_ERR_DB_REMOVE, 1);
+ RET_ERR(PM_ERR_DB_REMOVE, -1);
}
}
@@ -372,20 +372,9 @@ int alpm_db_update(int force, PM_DB *db)
_alpm_db_free_pkgcache(db);
/* uncompress the sync database */
- /* ORE
- we should not simply unpack the archive, but better parse it and
- db_write each entry (see sync_load_dbarchive to get archive content) */
- _alpm_log(PM_LOG_FLOW2, _("unpacking %s"), path);
- if(_alpm_unpack(path, db->path, NULL)) {
- RET_ERR(PM_ERR_SYSTEM, 1);
+ if(_alpm_db_install(db, path) == -1) {
+ return -1;
}
-
- /* remove the .tar.gz */
- /* aaron: let's not do this... we'll keep the DB around to be read for the
- * "new and improved" db routines
-
- unlink(path);
- */
}
return(0);