@pmatilai commented on this pull request.

> @@ -159,9 +159,18 @@ static int addTE(rpmte p, Header h, fnpyKey key, 
> rpmRelocation * relocs)
     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 --delete %s\n", p->version);
+       } else {
+           goto exit;
+       }
+    }
+
+    if (p->type != TR_REMOVED && rstreq(p->name, "gpg-pubkey")) {
+       rpmlog(RPMLOG_ERR, "public keys can not be installed as gpg-pubkey 
packages; use rpmkeys --import <keyfile> for that\n");

This and the erase warning above should be marked for translation - the _() 
thing around the string.

Since there's going to be at least one more round, minor nits / thoughts:
- just noticed there's a typo in one of the commit messages: "contrsucting"
- "for that" seems redundant, especially when the other message doesn't have 
(or need) it either
- the --delete command is something that can be copy-pasted directly, --import 
message isn't - maybe there should be a presentation difference (quotes around 
the --delete command or something)?

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

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

Reply via email to