aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-11 14:31:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-11 14:31:09 +0000
commit3f012fbc54be12c3a66be389d20382e333532f18 (patch)
treebfc6075591279ab0c93fe8fbe595c25b0b096cab
parentc592d47af9a803b50e4e114f73cb17f8a161b0c9 (diff)
downloadperl-URPM-3f012fbc54be12c3a66be389d20382e333532f18.tar
perl-URPM-3f012fbc54be12c3a66be389d20382e333532f18.tar.gz
perl-URPM-3f012fbc54be12c3a66be389d20382e333532f18.tar.bz2
perl-URPM-3f012fbc54be12c3a66be389d20382e333532f18.tar.xz
perl-URPM-3f012fbc54be12c3a66be389d20382e333532f18.zip
- add URPM::DB::verify()
-rw-r--r--NEWS2
-rw-r--r--URPM.xs13
2 files changed, 15 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index b82bd0e..881137e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- add URPM::DB::verify()
+
Version 3.00 - 11 December 2007, by Pascal "Pixel" Rigaux
- replace ->import_needed_pubkeys and ->import_pubkey in favor of
diff --git a/URPM.xs b/URPM.xs
index 0a4af7d..a634990 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2780,6 +2780,19 @@ Db_rebuild(prefix="")
OUTPUT:
RETVAL
+int
+Db_verify(prefix="")
+ char *prefix
+ PREINIT:
+ rpmts ts;
+ CODE:
+ ts = rpmtsCreate();
+ rpmtsSetRootDir(ts, prefix);
+ RETVAL = rpmtsVerifyDB(ts) == 0;
+ ts = rpmtsFree(ts);
+ OUTPUT:
+ RETVAL
+
void
Db_DESTROY(db)
URPM::DB db