@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\n");
+ } else {
+ goto exit;
+ }
+ }
+
+ if (p->type != TR_REMOVED && rstreq(p->name, "gpg-pubkey")) {
+ rpmlog(RPMLOG_ERR, "installing gpg-pubkey packages is not allowed. use
rpmkeys --import instead\n");
Same issue with the period, comma, capitals as above. Pointing to rpmkeys in
this case seems a bit dubious actually because rpmkeys wont import that package
either.
Another UI wisdom is that "allowed" tends to send the wrong kind of message,
even if we think of it in those terms. Maybe just "public keys cannot be
installed as packages"?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3478#pullrequestreview-2474747901
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3478/review/2474747...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint