aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-13 19:52:45 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-13 20:42:14 +0000
commit32e294bf995eb3880fc5dfe22849b258ac797231 (patch)
tree9b43ca97b8eff59c96447b3940430c712b2317d7
parente28378588618f059545db785b442ab3c8b92c5ce (diff)
downloadqarepo-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.pl13
1 files changed, 13 insertions, 0 deletions
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};