| |
@@ -13,7 +13,7 @@
|
| |
name = {name}
|
| |
baseurl = {baseurl}
|
| |
enabled = {enabled}
|
| |
- gpgcheck = 0
|
| |
+ gpgcheck = {gpgcheck}
|
| |
"""
|
| |
|
| |
CONTENT_TYPES = {
|
| |
@@ -86,7 +86,10 @@
|
| |
if not is_url(baseurl):
|
| |
baseurl = "file://" + baseurl
|
| |
|
| |
- content = REPO.format(name=name, enabled=enabled, baseurl=baseurl)
|
| |
+ content = REPO.format(name=name, enabled=enabled, baseurl=baseurl,
|
| |
+ gpgcheck=int(opts.gpgcheck))
|
| |
+ if opts.gpgkey:
|
| |
+ content += "gpgkey = %s\n" % opts.gpgkey
|
| |
print(content, file=output)
|
| |
|
| |
|
| |
@@ -160,6 +163,15 @@
|
| |
default="{release_short}-{release_version}-{variant}",
|
| |
help="Pattern for repository names.",
|
| |
)
|
| |
+ parser.add_argument(
|
| |
+ "--gpgcheck",
|
| |
+ action="store_true",
|
| |
+ help="Enable gpgcheck = 1. Default is gpgcheck = 0.",
|
| |
+ )
|
| |
+ parser.add_argument(
|
| |
+ "--gpgkey",
|
| |
+ help="gpgkey value (public key URL). Multiple key URLs should be comma-separated. Use --gpgcheck with this option.",
|
| |
+ )
|
| |
opts = parser.parse_args(args)
|
| |
|
| |
try:
|
| |
This is a simpler, declarative approach to my initial implementation in #119.
--gpgcheck
is a boolean and causes the repo to havegpgcheck = 1
for all variants.--gpgkey
takes an arbitrary string.