[Pkg-libvirt-commits] [libguestfs] 05/116: builder: use gpgkey_type for the gpgkey field in sources

Hilko Bengen bengen at moszumanska.debian.org
Wed Nov 26 22:04:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.29.10-1
in repository libguestfs.

commit 56bd781b76471cdce2602b34971f2f32b1ac1285
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Fri Oct 31 15:17:51 2014 +0100

    builder: use gpgkey_type for the gpgkey field in sources
---
 builder/builder.ml  | 4 ----
 builder/sources.ml  | 8 ++++----
 builder/sources.mli | 2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/builder/builder.ml b/builder/builder.ml
index 9a77a23..af61538 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -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 (
diff --git a/builder/sources.ml b/builder/sources.ml
index 9b81a3a..990a2ac 100644
--- a/builder/sources.ml
+++ b/builder/sources.ml
@@ -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
diff --git a/builder/sources.mli b/builder/sources.mli
index 3e31d35..f7bc016 100644
--- a/builder/sources.mli
+++ b/builder/sources.mli
@@ -19,7 +19,7 @@
 type source = {
   name : string;
   uri : string;
-  gpgkey : string option;
+  gpgkey : Utils.gpgkey_type;
   proxy : Downloader.proxy_mode;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list