summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-01 19:25:10 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-01 19:25:10 +0200
commit935df9b81e698d60181f7ca97730e22ac6b8b34e (patch)
tree00ce8a703a4a95d5a1d27e241010ccebaa775b89 /rpmdb
parent3ec04bd5add043955a94d735330bf374fbe8a269 (diff)
downloadlibrpm-tizen-935df9b81e698d60181f7ca97730e22ac6b8b34e.tar.gz
librpm-tizen-935df9b81e698d60181f7ca97730e22ac6b8b34e.tar.bz2
librpm-tizen-935df9b81e698d60181f7ca97730e22ac6b8b34e.zip
Silly helper method for determining if a header is source or binary
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/header.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rpmdb/header.h b/rpmdb/header.h
index 3e503b6bf..c5e4e7cf8 100644
--- a/rpmdb/header.h
+++ b/rpmdb/header.h
@@ -653,6 +653,15 @@ char * headerGetNEVRA(Header h, const char ** np );
*/
uint32_t headerGetColor(Header h);
+/** \ingroup header
+ * Check if header is a source or binary package header
+ * @param h header
+ * @return 0 == binary, 1 == source
+ */
+int headerIsSource(Header h)
+{
+ return (!headerIsEntry(h, RPMTAG_SOURCERPM));
+}
#ifdef __cplusplus
}
#endif