diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-11-13 19:52:45 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-11-13 20:42:14 +0000 |
commit | 32e294bf995eb3880fc5dfe22849b258ac797231 (patch) | |
tree | 9b43ca97b8eff59c96447b3940430c712b2317d7 | |
parent | e28378588618f059545db785b442ab3c8b92c5ce (diff) | |
download | qarepo-32e294bf995eb3880fc5dfe22849b258ac797231.tar qarepo-32e294bf995eb3880fc5dfe22849b258ac797231.tar.gz qarepo-32e294bf995eb3880fc5dfe22849b258ac797231.tar.bz2 qarepo-32e294bf995eb3880fc5dfe22849b258ac797231.tar.xz qarepo-32e294bf995eb3880fc5dfe22849b258ac797231.zip |
Add check that no updates_testing media are currently enabled...
...as that defeats the purpose of using QARepo.
-rw-r--r-- | qarepo.pl | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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}; |