]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: do not warn about Wants depencencies on masked units 2076/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Dec 2015 02:00:04 +0000 (21:00 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Dec 2015 02:00:04 +0000 (21:00 -0500)
When masking is used to prevent a unit from being loaded,
every transaction with dependent units would generate a warning.
Downgrade this warning to debug level.

transaction_add_job_and_dependencies only generated a few return
values found in the table in bus_common_errors.c, and EADDRNOTAVAIL
is not one of them, so do not try to suppress EADDRNOTAVAIL.

https://bugzilla.redhat.com/show_bug.cgi?id=1278264

src/core/transaction.c

index 15e79d00b30c15c24e629fa5f7c985134a8b8096..2f163190e9d5535894d4bee1fe7a2bb03acb7281 100644 (file)
@@ -950,7 +950,7 @@ int transaction_add_job_and_dependencies(
                                 r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, false, false, false, ignore_order, e);
                                 if (r < 0) {
                                         log_unit_full(dep,
-                                                      r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r,
+                                                      r == -EBADR /* unit masked */ ? LOG_DEBUG : LOG_WARNING, r,
                                                       "Cannot add dependency job, ignoring: %s",
                                                       bus_error_message(e, r));
                                         sd_bus_error_free(e);