From f49f99df008b7909d5f7bf01702d70d7b7475a59 Mon Sep 17 00:00:00 2001 From: jbj Date: Fri, 17 Jan 2003 17:43:04 +0000 Subject: - 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 --- rpmdb/hdrNVR.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'rpmdb/hdrNVR.c') 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; +} -- cgit v1.2.3