From 359a4538f51e88e41fbb613b9fa1f2aa47d17401 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 19 Sep 2011 18:20:56 +0000 Subject: (bad_signature) offer not to ask again about bad signatures --- perl-install/install/NEWS | 1 + perl-install/install/pkgs.pm | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index ffd8bd780..788641432 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -4,6 +4,7 @@ than Mageia - install perl-Hal-Cdroms for urpmi when needed - default to systemd (through "init=/bin/systemd") +- offer not to ask again about bad signatures Version 13.64 - 08 September 2011 diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index 5be19d91f..c7c279e1c 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -1,6 +1,7 @@ package install::pkgs; # $Id: pkgs.pm 267288 2010-04-02 14:49:40Z pterjan $ use strict; +use feature 'state'; BEGIN { # needed before "use URPM" @@ -799,7 +800,13 @@ sub _install_raw { log::l($msg); log::l($msg2); return 0 if $packages->{options}{auto}; - $::o->ask_yesorno(N("Warning"), "$msg\n\n$msg2"); + state $do_not_ask; + return if $do_not_ask; + $::o->ask_from_({ messages => "$msg\n\n$msg2" }, [ + { val => \$do_not_ask, + type => 'bool', text => N("Do not ask again"), + }, + ]); }, copy_removable => sub { my ($medium) = @_; -- cgit v1.2.1