From 606c70fdc9a0ee295fe81ec7e6efbbbe142d01be Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 16 Mar 2005 19:31:20 +0000 Subject: Added a db_update() function to manage sync databases updates. The API provides a wrapper alpm_db_update(). --- lib/libalpm/alpm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/libalpm/alpm.c') diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 6b79d4c8..145996fe 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -202,6 +202,18 @@ int alpm_db_unregister(PM_DB *db) return(0); } +int alpm_db_update(char *treename, char *archive) +{ + /* Sanity checks */ + ASSERT(handle != NULL, return(-1)); + ASSERT(treename != NULL && strlen(treename) != 0, PM_RET_ERR(PM_ERR_WRONG_ARGS, -1)); + + /* ORE + stat(archive); */ + + return(db_update(handle->root, handle->dbpath, treename, archive)); +} + PM_PKG *alpm_db_readpkg(PM_DB *db, char *name) { /* Sanity checks */ -- cgit v1.2.3