builder: use gpgkey_type for the gpgkey field in sources

This commit is contained in:
Pino Toscano
2014-10-31 15:17:51 +01:00
parent 3987bbcd91
commit 56bd781b76
3 changed files with 5 additions and 9 deletions

View File

@@ -152,10 +152,6 @@ let main () =
let repos = Sources.read_sources ~prog ~verbose in
let repos = List.map (
fun { Sources.uri = uri; Sources.gpgkey = gpgkey; Sources.proxy = proxy } ->
let gpgkey =
match gpgkey with
| None -> Utils.No_Key
| Some key -> Utils.KeyFile key in
uri, gpgkey, proxy
) repos in
let sources = List.map (

View File

@@ -25,7 +25,7 @@ open Unix
type source = {
name : string;
uri : string;
gpgkey : string option;
gpgkey : Utils.gpgkey_type;
proxy : Downloader.proxy_mode;
}
@@ -56,15 +56,15 @@ let parse_conf ~prog ~verbose file =
);
raise ex in
match k with
| None -> None
| None -> Utils.No_Key
| Some uri ->
(match uri.URI.protocol with
| "file" -> Some uri.URI.path
| "file" -> Utils.KeyFile uri.URI.path
| _ ->
if verbose then (
printf (f_"%s: '%s' has non-local gpgkey URI\n") prog n;
);
None
Utils.No_Key
) in
let proxy =
try

View File

@@ -19,7 +19,7 @@
type source = {
name : string;
uri : string;
gpgkey : string option;
gpgkey : Utils.gpgkey_type;
proxy : Downloader.proxy_mode;
}