koji-gc: Add ccache to koji-gc options
Fixes: https://pagure.io/koji/issue/4116
This commit is contained in:
parent
8ad473b6f2
commit
c603ff6ab6
1 changed files with 4 additions and 1 deletions
|
|
@ -97,6 +97,8 @@ def get_options():
|
||||||
"recommended.")
|
"recommended.")
|
||||||
parser.add_option("--exit-on-lock", action="store_true",
|
parser.add_option("--exit-on-lock", action="store_true",
|
||||||
help="quit if --lock-file exists, don't wait")
|
help="quit if --lock-file exists, don't wait")
|
||||||
|
parser.add_option("--ccache", default="/var/tmp/koji-gc.ccache",
|
||||||
|
help="Path to Kerberos credentials cache")
|
||||||
# parse once to get the config file
|
# parse once to get the config file
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
|
@ -142,6 +144,7 @@ def get_options():
|
||||||
['timeout', None, 'integer'],
|
['timeout', None, 'integer'],
|
||||||
['lock_file', None, 'string'],
|
['lock_file', None, 'string'],
|
||||||
['exit_on_lock', None, 'boolean'],
|
['exit_on_lock', None, 'boolean'],
|
||||||
|
['ccache', None, 'string'],
|
||||||
]
|
]
|
||||||
for name, alias, type in cfgmap:
|
for name, alias, type in cfgmap:
|
||||||
if alias is None:
|
if alias is None:
|
||||||
|
|
@ -399,7 +402,7 @@ def activate_session(session):
|
||||||
session.login()
|
session.login()
|
||||||
elif koji.reqgssapi:
|
elif koji.reqgssapi:
|
||||||
session.gssapi_login(principal=options.principal, keytab=options.keytab,
|
session.gssapi_login(principal=options.principal, keytab=options.keytab,
|
||||||
proxyuser=options.runas)
|
proxyuser=options.runas, ccache=options.ccache)
|
||||||
if not options.noauth and not session.logged_in:
|
if not options.noauth and not session.logged_in:
|
||||||
error("Error: unable to log in, no authentication methods available")
|
error("Error: unable to log in, no authentication methods available")
|
||||||
ensure_connection(session)
|
ensure_connection(session)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue