Learn more about these different git repos.
Other Git URLs
The import-sig sub-command always calls the writeSignedRPM RPC (if the user does not specify --test). Nothing checks whether the user has specified the --write option, and it's effectively always true. There's no way to run import-sig without writing the signed copies.
import-sig
writeSignedRPM
--test
--write
This behavior is almost certainly what users want anyway, so we might as well deprecate the --write flag and then remove it from the CLI.
Steps to reproduce:
koji -p kojidev import-sig bash-5.0.17-2.fc33.src.rpm
koji import-sig --help
Actual results: koji import-sig unconditionally writes the signed copies. The koji CLI shows the following output:
koji import-sig
Importing signature [key 782096ac] from bash-5.0.17-2.fc33.src.rpm... Writing signed copy
The --help text incorrectly indicates that Koji will only write the signed copies if the user specifies the --write flag.
--help
Expected results koji import-sig should unconditionally write the signed copies, and the --help text should mention that --write has no effect and is deprecated. Running import-sig with --write should print a DeprecationWarning.
DeprecationWarning
Looks like it's been this way since we introduced this flag in f570704
The unit tests actually do verify that session.writeSignedRPM.assert_has_calls(write_sig_calls)
session.writeSignedRPM.assert_has_calls(write_sig_calls)
We could update the help text to indicate this as well.
def handle_import_sig(goptions, session, args): - "[admin] Import signatures into the database" + "[admin] Import signatures into the database and write signed RPMs"
Metadata Update from @tkopecek: - Custom field Size adjusted to None - Issue set to the milestone: 1.24
I would prefer to not break working command lines. I would suggest making the option hidden in the help, but still accept it for compatibility. I don't know if we need to actually deprecate it. Many Unix commands accept such historical options for compatibility.
Ok. Looks like the way to do this in optparse is help=SUPPRESS_HELP.
help=SUPPRESS_HELP
PR #2654
Metadata Update from @jcupova: - Issue tagged with: testing-ready
Metadata Update from @jcupova: - Issue tagged with: testing-done
Commit c8572d4 fixes this issue
Commit e63508f fixes this issue
Commit 1c5c767 fixes this issue
Commit 72cf4a0 relates to this ticket
Login to comment on this ticket.