[Pkg-libvirt-commits] [libguestfs] 23/72: builder: when not checking sigs, ignore --fingerprint args (RHBZ#1193237)

Hilko Bengen bengen at moszumanska.debian.org
Sun Apr 5 15:19:48 UTC 2015


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

bengen pushed a commit to branch master
in repository libguestfs.

commit f0d8f92ab4881b1952c6dac0fc599d242e6a3a1c
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Tue Feb 17 16:24:12 2015 +0100

    builder: when not checking sigs, ignore --fingerprint args (RHBZ#1193237)
    
    When the user chooses to not verify the signatures on the indexes
    (using --no-check-signature), there is no point in requiring as many
    --fingerprint as --source (or even just one), as they will not be used
    anyway.
    
    In this case just ignore all the values of the specified --fingerprint
    arguments.
    
    (cherry picked from commit 869b9fcf97d1084e06c16ec25df60d3bc58bfb0f)
---
 builder/cmdline.ml | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index c0584f7..56322b5 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -280,13 +280,18 @@ read the man page virt-builder(1).
 
     let nr_sources = List.length sources in
     let fingerprints =
-      match fingerprints with
-      | [fingerprint] ->
-        (* You're allowed to have multiple sources and one fingerprint: it
-         * means that the same fingerprint is used for all sources.
-         *)
-        repeat fingerprint nr_sources
-      | xs -> xs in
+      if check_signature then (
+        match fingerprints with
+        | [fingerprint] ->
+          (* You're allowed to have multiple sources and one fingerprint: it
+           * means that the same fingerprint is used for all sources.
+           *)
+          repeat fingerprint nr_sources
+        | xs -> xs
+      ) else
+        (* We are not checking signatures, so just ignore any fingerprint
+         * specified. *)
+        repeat "" nr_sources in
 
     if List.length fingerprints <> nr_sources then
       error (f_"source and fingerprint lists are not the same length");

-- 
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