@pmatilai commented on this pull request.


>      headerDel(pkg->header, RPMTAG_PAYLOADDIGEST);
     headerPutString(pkg->header, RPMTAG_PAYLOADDIGEST, pld);
     headerDel(pkg->header, RPMTAG_PAYLOADDIGESTALT);
     headerPutString(pkg->header, RPMTAG_PAYLOADDIGESTALT, upld);
     pld = _free(pld);
 
+    if (pkg->rpmver >= 6) {
+       headerDel(pkg->header, RPMTAG_PAYLOADSIZE);
+       headerPutUint64(pkg->header, RPMTAG_PAYLOADSIZE, &payloadSize, 1);
+       headerDel(pkg->header, RPMTAG_PAYLOADSIZEALT);
+       headerPutUint64(pkg->header, RPMTAG_PAYLOADSIZEALT, &archiveSize, 1);

All the archive size related tags are in the signature header in v4, they're 
just translated and appended (as dribbles) to the main header upon package 
read. The reason for entirely new tags is that this is ALWAYS in the main 
header and thus hashed, whereas all the v4 archive size tags are always 
non-hashed. There's maybe no strict "we absolutely need this" use for the size, 
BUT since the info is easily available and is now reliable, I don't see why 
not. There are more useless bits of data in the header :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2920#discussion_r1498778226
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2920/review/1895109...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to