From 522ef5e981580a52ee0ffa37178d7ddf116ebd51 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 12 May 2008 07:49:01 +1000 Subject: Move the cache stuff where it should be Cache bullshit only has relevance to be_files, so move it there. Signed-off-by: Dan McGee [Allan: BIG rebase] Signed-off-by: Allan McRae --- lib/libalpm/add.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index cc0c4c13..d76407b9 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -40,7 +40,6 @@ #include "alpm_list.h" #include "trans.h" #include "util.h" -#include "cache.h" #include "log.h" #include "backup.h" #include "package.h" -- cgit v1.2.3 From 5b2de3d8ecceea0eed3124e50792400adce4e95a Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 13 Oct 2010 18:04:07 +1000 Subject: Separate be_files into be_sync and be_local The file be_files.c is "split" to be_local.c and be_sync.c in order to achieve separate handling of sync and local databases. Some basic clean-up of functions that are only of use for local or sync databases has been performed and some rough function renaming in duplicated code has been performed to prevent compilation errors. However, most of the clean-up and final separation of sync and local db handling occurs in following patches. Signed-off-by: Allan McRae --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index d76407b9..3e5e8c59 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -543,7 +543,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count, /* prepare directory for database entries so permission are correct after changelog/install script installation (FS#12263) */ - if(_alpm_db_prepare(db, newpkg)) { + if(_alpm_local_db_prepare(db, newpkg)) { alpm_logaction("error: could not create database entry %s-%s\n", alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg)); pm_errno = PM_ERR_DB_WRITE; @@ -661,7 +661,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count, _alpm_log(PM_LOG_DEBUG, "updating database\n"); _alpm_log(PM_LOG_DEBUG, "adding database entry '%s'\n", newpkg->name); - if(_alpm_db_write(db, newpkg, INFRQ_ALL)) { + if(_alpm_local_db_write(db, newpkg, INFRQ_ALL)) { _alpm_log(PM_LOG_ERROR, _("could not update database entry %s-%s\n"), alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg)); alpm_logaction("error: could not update database entry %s-%s\n", -- cgit v1.2.3 From fc32faaa6ab4081e2046b2a81e4f9949af2f7282 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 9 Oct 2010 20:16:15 +1000 Subject: Completely separate local and sync db handling Put the db_operations struct to use and completely split the handling of the sync and local databases. Signed-off-by: Allan McRae --- lib/libalpm/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 3e5e8c59..2b6b019b 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -497,7 +497,7 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count, oldpkg = _alpm_pkg_dup(local); /* make sure all infos are loaded because the database entry * will be removed soon */ - _alpm_db_read(oldpkg->origin_data.db, oldpkg, INFRQ_ALL); + _alpm_local_db_read(oldpkg->origin_data.db, oldpkg, INFRQ_ALL); EVENT(trans, PM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg); _alpm_log(PM_LOG_DEBUG, "upgrading package %s-%s\n", -- cgit v1.2.3