summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorroot <devnull@localhost>1996-02-14 16:12:32 +0000
committerroot <devnull@localhost>1996-02-14 16:12:32 +0000
commit9da1bde9e6022eff490c3971b74d25129413e6bd (patch)
treecd5a6c1d5b7bc382fdef7400508629e9acd6c846 /lib
parent0a1c831d2d0c8513b219c175d38f4d1923572dbf (diff)
downloadrpm-9da1bde9e6022eff490c3971b74d25129413e6bd.tar.gz
rpm-9da1bde9e6022eff490c3971b74d25129413e6bd.tar.bz2
rpm-9da1bde9e6022eff490c3971b74d25129413e6bd.zip
fixed for packages w/o any groups
CVS patchset: 258 CVS date: 1996/02/14 16:12:32
Diffstat (limited to 'lib')
-rw-r--r--lib/package.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/package.c b/lib/package.c
index 3a26eb6b3..429d70f07 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -89,7 +89,11 @@ static int readOldHeader(int fd, Header * hdr, int * isSource) {
addEntry(dbentry, RPMTAG_VENDOR, STRING_TYPE, spec.vendor, 1);
addEntry(dbentry, RPMTAG_SIZE, INT32_TYPE, &oldheader.size, 1);
addEntry(dbentry, RPMTAG_COPYRIGHT, STRING_TYPE, spec.copyright, 1);
- addEntry(dbentry, RPMTAG_GROUP, STRING_TYPE, oldheader.group, 1);
+
+ if (oldheader.group)
+ addEntry(dbentry, RPMTAG_GROUP, STRING_TYPE, oldheader.group, 1);
+ else
+ addEntry(dbentry, RPMTAG_GROUP, STRING_TYPE, "Unknown", 1);
if (spec.prein)
addEntry(dbentry, RPMTAG_PREIN, STRING_TYPE, spec.prein, 1);
@@ -178,5 +182,7 @@ static int readOldHeader(int fd, Header * hdr, int * isSource) {
free(fileStatesList);
}
+ oldhdrFree(&oldheader);
+
return 0;
}