summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-29 07:20:33 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-03-29 07:20:33 +0300
commit750b534942f0191f2d14d2974541ecaaa13820a5 (patch)
tree714cfefe4f4c2b89309820539f6237f31d95cf8f /lib/formats.c
parent09363b8c794c0f85d164a94f9fc7ff4d22ea6d6f (diff)
downloadrpm-750b534942f0191f2d14d2974541ecaaa13820a5.tar.gz
rpm-750b534942f0191f2d14d2974541ecaaa13820a5.tar.bz2
rpm-750b534942f0191f2d14d2974541ecaaa13820a5.zip
Report all enabled dependency bits in deptype format extension
- dont make assumptions about which bits can be enabled simultaneously, just dump 'em all
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/formats.c b/lib/formats.c
index 7f681a255..c13f46d92 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -246,23 +246,22 @@ static char * deptypeFormat(rpmtd td, char * formatPrefix)
argvAdd(&sdeps, "postun");
if (item & RPMSENSE_SCRIPT_VERIFY)
argvAdd(&sdeps, "verify");
+ if (item & RPMSENSE_INTERP)
+ argvAdd(&sdeps, "interp");
+ if (item & RPMSENSE_RPMLIB)
+ argvAdd(&sdeps, "rpmlib");
+ if ((item & RPMSENSE_FIND_REQUIRES) || (item & RPMSENSE_FIND_PROVIDES))
+ argvAdd(&sdeps, "auto");
+ if (item & RPMSENSE_PREREQ)
+ argvAdd(&sdeps, "prereq");
if (sdeps) {
val = argvJoin(sdeps, ",");
- argvFree(sdeps);
} else {
- if (item & RPMSENSE_RPMLIB)
- val = xstrdup("rpmlib");
- else if (item & RPMSENSE_INTERP)
- val = xstrdup("interp");
- else if ((item & RPMSENSE_FIND_REQUIRES) ||
- (item & RPMSENSE_FIND_PROVIDES))
- val = xstrdup("auto");
- else if (item & RPMSENSE_PREREQ)
- val = xstrdup("prereq");
- else
- val = xstrdup("manual");
+ val = xstrdup("manual");
}
+
+ argvFree(sdeps);
}
return val;
}