From 13235ba65ab55d852dbdc0acabdc047442e74e28 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 28 Jun 2011 22:02:58 -0500 Subject: Make local_db_read() private to the local backend There is little need to expose the guts of this function even within the library. Make it static in be_local.c, and clean up a few other things since we know exactly where it is being called from: * Remove unnecessary origin checks in _cache_get_*() methods- if you are calling a cache method your package type will be correct. * Remove sanity checks within local_db_read() itself- packages will always have a name and version if they get this far, and the package object will never be NULL either. The one case calling this from outside the backend was in add.c, where we forced a full load of a package before we duplicated it. Move this concern elsewhere and have pkg_dup() always force a full package load via a new force_load() function on the operations callback struct. Signed-off-by: Dan McGee --- lib/libalpm/db.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libalpm/db.h') diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index 7055abd8..7dce006f 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -87,7 +87,6 @@ alpm_db_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename, void _alpm_db_unregister(alpm_db_t *db); /* be_*.c, backend specific calls */ -int _alpm_local_db_read(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq); int _alpm_local_db_prepare(alpm_db_t *db, alpm_pkg_t *info); int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq); int _alpm_local_db_remove(alpm_db_t *db, alpm_pkg_t *info); -- cgit v1.2.3-24-g4f1b