summaryrefslogtreecommitdiff
path: root/rpmdb/hdrNVR.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-01-17 17:43:04 +0000
committerjbj <devnull@localhost>2003-01-17 17:43:04 +0000
commitf49f99df008b7909d5f7bf01702d70d7b7475a59 (patch)
tree9bfad53639ffa14cd2792c27becdbab173b4f040 /rpmdb/hdrNVR.c
parente5c6b0d28d48fb35ff47c0c2d55021735ec7e88c (diff)
downloadlibrpm-tizen-f49f99df008b7909d5f7bf01702d70d7b7475a59.tar.gz
librpm-tizen-f49f99df008b7909d5f7bf01702d70d7b7475a59.tar.bz2
librpm-tizen-f49f99df008b7909d5f7bf01702d70d7b7475a59.zip
- duplicate package checks with arch/os checks if colored.
- file conflict checks with colors. CVS patchset: 6013 CVS date: 2003/01/17 17:43:04
Diffstat (limited to 'rpmdb/hdrNVR.c')
-rw-r--r--rpmdb/hdrNVR.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c
index 18f3e537d..d69978152 100644
--- a/rpmdb/hdrNVR.c
+++ b/rpmdb/hdrNVR.c
@@ -30,3 +30,35 @@ int headerNVR(Header h, const char **np, const char **vp, const char **rp)
/*@=boundswrite@*/
return 0;
}
+
+int headerNEVRA(Header h, const char **np,
+ /*@unused@*/ const char **ep, const char **vp, const char **rp,
+ const char **ap)
+{
+ int type;
+ int count;
+
+/*@-boundswrite@*/
+ if (np) {
+ if (!(headerGetEntry(h, RPMTAG_NAME, &type, (void **) np, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *np = NULL;
+ }
+ if (vp) {
+ if (!(headerGetEntry(h, RPMTAG_VERSION, &type, (void **) vp, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *vp = NULL;
+ }
+ if (rp) {
+ if (!(headerGetEntry(h, RPMTAG_RELEASE, &type, (void **) rp, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *rp = NULL;
+ }
+ if (ap) {
+ if (!(headerGetEntry(h, RPMTAG_ARCH, &type, (void **) ap, &count)
+ && type == RPM_STRING_TYPE && count == 1))
+ *ap = NULL;
+ }
+/*@=boundswrite@*/
+ return 0;
+}