From 32e294bf995eb3880fc5dfe22849b258ac797231 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 13 Nov 2018 19:52:45 +0000 Subject: Add check that no updates_testing media are currently enabled... ...as that defeats the purpose of using QARepo. --- qarepo.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qarepo.pl b/qarepo.pl index abbae63..5a9cefb 100644 --- a/qarepo.pl +++ b/qarepo.pl @@ -318,6 +318,8 @@ sub disable { } sub enable { + check_no_testing_media("This may enable unwanted packages to be installed.") + or return; disable_buttons(); get_settings(); if (sync_repo()) { @@ -354,6 +356,17 @@ sub error_dismiss { # Subsidiary Functions ############################################################################### +sub check_no_testing_media { + my ($message2) = @_; + if (system("urpmq --list-url | grep -q updates_testing") == 0) { + my $message1 = "Some updates_testing media are enabled."; + my $message3 = "Please disable these media and try again."; + show_error_dialogue(($message1, $message2, $message3)); + return 0; + } + 1; +} + sub set_qa_repo_info { $qa_repo_name = $qa_repo_names{$arch}; -- cgit v1.2.1