diff options
author | root <devnull@localhost> | 1996-02-14 16:12:32 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-02-14 16:12:32 +0000 |
commit | 9da1bde9e6022eff490c3971b74d25129413e6bd (patch) | |
tree | cd5a6c1d5b7bc382fdef7400508629e9acd6c846 /lib | |
parent | 0a1c831d2d0c8513b219c175d38f4d1923572dbf (diff) | |
download | rpm-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.c | 8 |
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; } |