@pmatilai commented on this pull request.
>
p->epoch = headerGetAsString(h, RPMTAG_EPOCH);
p->arch = headerGetAsString(h, RPMTAG_ARCH);
p->os = headerGetAsString(h, RPMTAG_OS);
- /* gpg-pubkey's dont have os or arch (sigh), for others they are required
*/
- if (!rstreq(p->name, "gpg-pubkey") && (p->arch == NULL || p->os == NULL))
+ if (p->arch == NULL || p->os == NULL) {
+ if (p->type == TR_REMOVED && rstreq(p->name, "gpg-pubkey")) {
+ rpmlog(RPMLOG_WARNING, "Erasing gpg-pubkey packages is deprecated!
Use rpmkeys.\n");
+ } else {
+ if (p->arch == NULL)
+ rpmlog(RPMLOG_ERR, _("Package is missing %s\n"), "arch");
+ if (p->os == NULL)
+ rpmlog(RPMLOG_ERR, _("Package is missing %s\n"), "os");
If you want to add an error message, and one central "malformed package" style
thing at the end of addTE() on error, that'll cover all the existing sanity
checks too. There are a hundred thousand ways things can go wrong and we can't
have specific messages for each.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3478#pullrequestreview-2472007501
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3478/review/2472007...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint