summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-16 19:31:20 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-16 19:31:20 +0000
commit606c70fdc9a0ee295fe81ec7e6efbbbe142d01be (patch)
tree81a14a4b7111a8f18399aeaf7db820f52bc27dad /lib/libalpm/alpm.c
parent5faecdb523a8a6d1bff082f55d35d4ada6b9a257 (diff)
downloadpacman-606c70fdc9a0ee295fe81ec7e6efbbbe142d01be.tar.xz
Added a db_update() function to manage sync databases updates.
The API provides a wrapper alpm_db_update().
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c12
1 files changed, 12 insertions, 0 deletions
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 */