Skip to content

Commit

Permalink
Don't delete delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ffesti authored and pmatilai committed Nov 18, 2024
1 parent abb6ab1 commit 4c99a01
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/man/rpmkeys.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rpmkeys - RPM Keyring
SYNOPSIS
========

**rpmkeys** {**\--list\|\--import\|\--erase\|\--checksig**}
**rpmkeys** {**\--list\|\--import\|\--erase\|\--delete\|\--checksig**}

DESCRIPTION
===========
Expand All @@ -25,7 +25,7 @@ The general forms of rpm digital signature commands are

**rpmkeys** {**-i\|\--import**} *PUBKEY \...*

**rpmkeys** {**-e\|\--erase**} *FINGERPRINT \...*
**rpmkeys** {**-e\|\--erase\|-d\|\--delete**} *FINGERPRINT \...*

**rpmkeys** {**-K\|\--checksig**} *PACKAGE\_FILE \...*

Expand Down Expand Up @@ -58,7 +58,7 @@ as Sequoia or GnuPG. For example:

**rpmkeys --export 771b18d3d7baa28734333c424344591e1964c5fc | sq inspect **

**rpmkeys** {**-e\|\--erase**} *FINGERPRINT \...*
**rpmkeys** {**-e\|\--erase\|-d\|\--delete**} *FINGERPRINT \...*

Erase the key(s) designated by *FINGERPRINT*. For example:

Expand Down
4 changes: 2 additions & 2 deletions tests/rpmdb.at
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ runroot rpmkeys --list XXX
])

RPMTEST_CHECK([
runroot rpmkeys --erase 1964c5fc
runroot rpmkeys --erase 757bf69e
runroot rpmkeys -d 1964c5fc
runroot rpmkeys -e 757bf69e
runroot rpmkeys --erase eb04e625
runroot rpmkeys --list
],
Expand Down
12 changes: 6 additions & 6 deletions tests/rpmsigdig.at
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64-signed-with-new-subkey.rpm
[])

RPMTEST_CHECK([
runroot rpmkeys -e abcd gimmekey 1111aaaa2222bbbb
runroot rpmkeys -d abcd gimmekey 1111aaaa2222bbbb
],
[1],
[],
Expand All @@ -110,7 +110,7 @@ error: key not found: 1111aaaa2222bbbb
])

RPMTEST_CHECK([
runroot rpmkeys --erase 1964c5fc
runroot rpmkeys --delete 1964c5fc
],
[0],
[],
Expand Down Expand Up @@ -227,7 +227,7 @@ runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64-signed-with-new-subkey.rpm
[])

RPMTEST_CHECK([
runroot rpmkeys --erase abcd gimmekey 1111aaaa2222bbbb
runroot rpmkeys --delete abcd gimmekey 1111aaaa2222bbbb
],
[1],
[],
Expand All @@ -237,7 +237,7 @@ error: key not found: 1111aaaa2222bbbb
])

RPMTEST_CHECK([
runroot rpmkeys --erase 1964c5fc
runroot rpmkeys --delete 1964c5fc
],
[0],
[],
Expand Down Expand Up @@ -324,7 +324,7 @@ runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64-signed-with-new-subkey.rpm
[])

RPMTEST_CHECK([
runroot rpmkeys --erase abcd gimmekey 1111aaaa2222bbbb
runroot rpmkeys --delete abcd gimmekey 1111aaaa2222bbbb
],
[1],
[],
Expand All @@ -334,7 +334,7 @@ error: key not found: 1111aaaa2222bbbb
])

RPMTEST_CHECK([
runroot rpmkeys --erase 1964c5fc
runroot rpmkeys --delete 1964c5fc
],
[0],
[],
Expand Down
3 changes: 1 addition & 2 deletions tools/rpmkeys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ static struct poptOption keyOptsTable[] = {
N_("export an public key"), NULL },
{ "test", 't', POPT_ARG_NONE, &test, 0,
N_("don't import, but tell if it would work or not"), NULL },
{ "delete", 'd', (POPT_ARG_VAL|POPT_ARGFLAG_OR|POPT_ARGFLAG_DOC_HIDDEN),
&mode, MODE_DELKEY,
{ "delete", 'd', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_DELKEY,
N_("Erase keys from RPM keyring"), NULL },
{ "erase", 'e', (POPT_ARG_VAL|POPT_ARGFLAG_OR), &mode, MODE_DELKEY,
N_("Erase keys from RPM keyring"), NULL },
Expand Down

0 comments on commit 4c99a01

Please sign in to comment.