summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-09-12 14:56:41 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-09-12 14:56:41 +0300
commitc094de4d1017af3ffbe89fdbb1db5bb821467c73 (patch)
tree92f066a70f88b66e47633fcb596a75258422d9c0 /build
parent1327278138c7f24b11b8ea231331991eb20385ee (diff)
downloadrpm-c094de4d1017af3ffbe89fdbb1db5bb821467c73.tar.gz
rpm-c094de4d1017af3ffbe89fdbb1db5bb821467c73.tar.bz2
rpm-c094de4d1017af3ffbe89fdbb1db5bb821467c73.zip
Make sure RPMTAG_GROUP is always present in packages
- Many things (including LSB and various 3rd party applications) expect group tag to be present even if they don't actually use it for anything. rpmbuild doesn't consider it mandatory in specs anymore though, so stick "Unspecified" in there to avoid breaking things in case spec didn't set it.
Diffstat (limited to 'build')
-rw-r--r--build/parsePreamble.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 988b61558..f39ee9a1f 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -890,6 +890,11 @@ int parsePreamble(rpmSpec spec, int initialPackage)
headerCopyTags(spec->packages->header, pkg->header,
(rpmTag *)copyTagsDuringParse);
+ /* Many things expect group to always exist, put something in there... */
+ if (!headerIsEntry(pkg->header, RPMTAG_GROUP)) {
+ headerPutString(pkg->header, RPMTAG_GROUP, "Unspecified");
+ }
+
if (checkForRequired(pkg->header, NVR)) {
goto exit;
}