- if Options.get("Suite"):
- con_suites = "AND (";
- wrong_suites = 0;
- suites = string.split(Options["Suite"]);
- for suite in suites:
- suite_id = db_access.get_suite_id(suite);
- if suite_id == -1:
- utils.warn("suite '%s' not recognised." % (suite));
- wrong_suites = wrong_suites + 1;
- else:
- con_suites = con_suites + "su.id = %s OR " % (suite_id);
- if wrong_suites >= len(suites):
- utils.fubar("No correct suite given.");
- con_suites = con_suites[:-3] + ")";
- else:
- con_suites = "";
-
- if Options.get("Architecture"):
- con_architectures = "AND (";
- check_source = 0;
- wrong_architectures = 0;
- architectures = string.split(Options["Architecture"]);
- for architecture in architectures:
- if architecture == "source":
- check_source = 1;
- architecture_id = db_access.get_architecture_id(architecture);
- if architecture_id == -1:
- utils.warn("architecture '%s' not recognised." % (architecture));
- wrong_architectures = wrong_architectures + 1;
- else:
- con_architectures = con_architectures + "a.id = %s OR " % (architecture_id);
- if wrong_architectures >= len(architectures):
- utils.fubar("No correct architecture given");
- con_architectures = con_architectures[:-3] + ")";
- else:
- con_architectures = "";
- check_source = 1;
+ # If cron.daily is running; warn the user that our output might seem strange
+ if os.path.exists(os.path.join(Cnf["Dir::Root"], "Archive_Maintenance_In_Progress")):
+ utils.warn("Archive maintenance is in progress; database inconsistencies are possible.");