RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Olivier Thauvin
Root: /v/rpm/cvs Email: nanardon@rpm5.org
Module: rpm Date: 16-Jul-2007 23:58:21
Branch: HEAD Handle: 2007071622582000
Modified files:
rpm/lib rpmps.c rpmps.h
Log:
- expose functions in rpmps API (from rpm-4_5 branch)
Summary:
Revision Changes Path
2.12 +28 -0 rpm/lib/rpmps.c
2.10 +46 -0 rpm/lib/rpmps.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/lib/rpmps.c
============================================================================
$ cvs diff -u -r2.11 -r2.12 rpmps.c
--- rpm/lib/rpmps.c 16 Jul 2007 01:32:28 -0000 2.11
+++ rpm/lib/rpmps.c 16 Jul 2007 21:58:20 -0000 2.12
@@ -341,3 +341,31 @@
}
}
+
+rpmProblem rpmpsGetProblem(rpmps ps, int num)
+{
+ if (num > ps->numProblems)
+ return(NULL);
+ else
+ return(ps->probs + num);
+}
+
+char * rpmProblemGetPkgNEVR(rpmProblem prob)
+{
+ return(prob->pkgNEVR);
+}
+
+char * rpmProblemGetAltNEVR(rpmProblem prob)
+{
+ return(prob->altNEVR);
+}
+
+rpmProblemType rpmProblemGetType(rpmProblem prob)
+{
+ return(prob->type);
+}
+
+fnpyKey rpmProblemKey(rpmProblem prob)
+{
+ return(prob->key);
+}
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmps.h
============================================================================
$ cvs diff -u -r2.9 -r2.10 rpmps.h
--- rpm/lib/rpmps.h 25 May 2007 17:36:02 -0000 2.9
+++ rpm/lib/rpmps.h 16 Jul 2007 21:58:20 -0000 2.10
@@ -194,6 +194,52 @@
int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
/*@modifies ps @*/;
+/**
+ * Return a problem from problem set
+ *
+ * @param ps problem set
+ * @param num problem number
+ * @return rpmProblem, or NULL if error
+ */
+rpmProblem rpmpsGetProblem(/*@null@*/ rpmps ps, int num)
+ /*@*/;
+
+/**
+ * Return the package NEVR causing the problem
+ *
+ * @param prob rpm problem
+ * @return NEVR string ptr
+ */
+char * rpmProblemGetPkgNEVR(rpmProblem prob)
+ /*@*/;
+
+/**
+ * Return the second package NEVR causing the problem
+ *
+ * @param prob rpm problem
+ * @return NEVR string ptr, or NULL if unset
+ */
+char * rpmProblemGetAltNEVR(rpmProblem prob)
+ /*@*/;
+
+/**
+ * Return the problem type
+ *
+ * @param prob rpm problem
+ * @return rpmProblemType
+ */
+rpmProblemType rpmProblemGetType(rpmProblem prob)
+ /*@*/;
+
+/**
+ * Return the transaction key causing the problem
+ *
+ * @param prob rpm problem
+ * @return fnpkey ptr if any or NULL
+ */
+fnpyKey rpmProblemKey(rpmProblem prob)
+ /*@*/;
+
#ifdef __cplusplus
}
#endif
@@ .
Received on Mon Jul 16 23:58:21 2007