Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-28 Thread Panu Matilainen
Merged #2921 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921#event-11949396433 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-28 Thread Panu Matilainen
@pmatilai approved this pull request. Looks fine now, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921#pullrequestreview-1905848211 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-27 Thread Florian Festi
@ffesti commented on this pull request. > @@ -42,6 +41,20 @@ static struct poptOption optionsTable[] = { POPT_TABLEEND }; +static ARGV_t gpgkeyargs(ARGV_const_t args) { +ARGV_t gpgargs = argvNew(); +for (char * const * arg = args; *arg; arg++) { + if (strncmp(*arg,

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-27 Thread Florian Festi
@ffesti pushed 1 commit. c33f2943fe01fd629a0beda4efcf2a3b60b1c7f0 Add --list and --delete to rpmkeys -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921/files/3ae469d7df0755d847fedd7bbc8f7edd6ec13251..c33f2943fe01fd629a0beda4efcf2a3b60b1c7f0 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -42,6 +41,20 @@ static struct poptOption optionsTable[] = { POPT_TABLEEND }; +static ARGV_t gpgkeyargs(ARGV_const_t args) { +ARGV_t gpgargs = argvNew(); +for (char * const * arg = args; *arg; arg++) { + if (strncmp(*arg,

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-26 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -42,6 +41,20 @@ static struct poptOption optionsTable[] = { POPT_TABLEEND }; +static ARGV_t gpgkeyargs(ARGV_const_t args) { +ARGV_t gpgargs = argvNew(); argvNew() is wholly unnecessary here (it almost always is), just initialize to

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Panu Matilainen
> Well, I stuck to the names that were in the code... I know. My not-so-thoroughly thought up names from 10+ years ago, and a fine example of why not to leave such half-assed pieces laying around in the codebase :laughing: > It also uses "--delete" while rpm itself uses "--erase". Not sure if

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Florian Festi
@ffesti pushed 1 commit. 109d770953bb47582727bc33def7df064a92f080 Add --list and --delete to rpmkeys -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921/files/44709043703d3f0e0f3f0534e05a3fcb3df8ea93..109d770953bb47582727bc33def7df064a92f080 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Florian Festi
Well, I stuck to the names that were in the code... but it turns out the "keys" in in the name of the utility already and we don't need to repeat that in the cli parameter. It also uses "--delete" while rpm itself uses "--erase". Not sure if that is good because it is a slightly different

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Florian Festi
@ffesti pushed 1 commit. 44709043703d3f0e0f3f0534e05a3fcb3df8ea93 Add --list and --delete to rpmkeys -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921/files/20e8342f76425d1085138973e2f4a7837c8dcb87..44709043703d3f0e0f3f0534e05a3fcb3df8ea93 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Panu Matilainen
@pmatilai commented on this pull request. > case MODE_LISTKEY: + if (args != NULL) { + argerror(_("--list-keys does not take any arguments")); + } + ARGV_t query = argvSplitString("gpg-pubkey", " ", ARGV_NONE); It's a bit creative way to initialize an argv... I

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Panu Matilainen
@pmatilai commented on this pull request. > case MODE_LISTKEY: + if (args != NULL) { + argerror(_("--list-keys does not take any arguments")); I think it should (take optional arguments), actually. It could be useful for eg checking whether a particular key is imported,

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-21 Thread Florian Festi
@ffesti pushed 2 commits. 1fcfcb58c1025a36b8b44d13c688f3e70ae779fd Don't advertise rpm -qa gpg-pubkey* in man page 20e8342f76425d1085138973e2f4a7837c8dcb87 Add --list-keys and --delete-key to rpmkeys -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-20 Thread Panu Matilainen
I think I initially wanted to add a sane API for these and then have rpmkeys use that, and when that seemed painful I gave up. But the user wont care *how* it's achieved if it works in a meaningful manner. And, for the user this is far saner than 'rpmkeys --import -> rpm -q -> rpm --erase'.

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-20 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -75,7 +74,29 @@ int main(int argc, char *argv[]) break; /* XXX TODO: actually implement these... */ Maybe delete this comment while at it? :smile: A fine example of why comments are so bad - they don't get updated along with the

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-20 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -75,7 +74,29 @@ int main(int argc, char *argv[]) break; /* XXX TODO: actually implement these... */ case MODE_DELKEY: + struct rpmInstallArguments_s * ia = + ARGV_t gpgargs = argvNew(); + for (char * const * arg

Re: [Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-20 Thread Florian Festi
This feels a bit too quick and dirty. Comments welcome. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2921#issuecomment-1956047845 You are receiving this because you are subscribed to this thread. Message ID:

[Rpm-maint] [rpm-software-management/rpm] Add --list-keys and --delete-key to rpmkeys (PR #2921)

2024-02-20 Thread Florian Festi
This is a bit of a hack as it manipulates the parsed cli parameters to to the right thing and then calls rpmcliQuery and rpmErase. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2921 -- Commit Summary -- * Add