[systemd-commits] 2 commits - shell-completion/bash src/core

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Wed Feb 5 21:47:15 PST 2014


 shell-completion/bash/busctl          |    2 +-
 shell-completion/bash/hostnamectl     |    2 +-
 shell-completion/bash/localectl       |    2 +-
 shell-completion/bash/loginctl        |    2 +-
 shell-completion/bash/systemctl       |    2 +-
 shell-completion/bash/systemd-analyze |    2 +-
 shell-completion/bash/timedatectl     |    2 +-
 shell-completion/bash/udevadm         |    2 +-
 src/core/manager.c                    |    3 ---
 src/core/transaction.c                |    4 +++-
 10 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit 75cb8502dfec0a6a5305fe766d4b6a1a04a43549
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Thu Feb 6 00:37:18 2014 -0500

    transaction: print more information about conflicting jobs
    
    Also remove some debug statement that should not have been committed.

diff --git a/src/core/manager.c b/src/core/manager.c
index 3f8bf58..45f5f70 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -105,7 +105,6 @@ static int manager_watch_jobs_in_progress(Manager *m) {
                 return 0;
 
         next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC;
-        log_debug("queuing for "USEC_FMT, next);
         return sd_event_add_monotonic(m->event, next, 0, manager_dispatch_jobs_in_progress, m, &m->jobs_in_progress_event_source);
 }
 
@@ -1766,7 +1765,6 @@ static int manager_dispatch_jobs_in_progress(sd_event_source *source, usec_t use
         manager_print_jobs_in_progress(m);
 
         next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC;
-        log_debug("requeuing for "USEC_FMT, next);
         r = sd_event_source_set_time(source, next);
         if (r < 0)
                 return r;
@@ -2468,7 +2466,6 @@ void manager_check_finished(Manager *m) {
         if (hashmap_size(m->jobs) > 0) {
                 if (m->jobs_in_progress_event_source) {
                         uint64_t next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC;
-                        log_debug("requeuing for "USEC_FMT, next);
                         sd_event_source_set_time(m->jobs_in_progress_event_source, next);
                 }
                 return;
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 36e31c4..d00f427 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -223,7 +223,9 @@ static int delete_one_unmergeable_job(Transaction *tr, Job *j) {
 
                         /* Ok, we can drop one, so let's do so. */
                         log_debug_unit(d->unit->id,
-                                       "Fixing conflicting jobs by deleting job %s/%s",
+                                       "Fixing conflicting jobs %s/%s,%s/%s by deleting job %s/%s",
+                                       j->unit->id, job_type_to_string(j->type),
+                                       k->unit->id, job_type_to_string(k->type),
                                        d->unit->id, job_type_to_string(d->type));
                         transaction_delete_job(tr, d, true);
                         return 0;

commit 3ce09b7da2eb8b888066468663b2b5c81a05a03c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Thu Feb 6 00:31:22 2014 -0500

    bash-completion: fix completion of complete verbs
    
    When doing 'command verb<TAB>', the arguments for verb would be
    proposed, but it is too early. We should complete verb first.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=74596

diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl
index 8ce813f4..7480a6c 100644
--- a/shell-completion/bash/busctl
+++ b/shell-completion/bash/busctl
@@ -53,7 +53,7 @@ _busctl() {
                 [STANDALONE]='list monitor'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
index 38ab134..9c75da9 100644
--- a/shell-completion/bash/hostnamectl
+++ b/shell-completion/bash/hostnamectl
@@ -41,7 +41,7 @@ _hostnamectl() {
                       [NAME]='set-hostname'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then
                         verb=${COMP_WORDS[i]}
                         break
diff --git a/shell-completion/bash/localectl b/shell-completion/bash/localectl
index bec9e78..84e2a6b 100644
--- a/shell-completion/bash/localectl
+++ b/shell-completion/bash/localectl
@@ -52,7 +52,7 @@ _localectl() {
                       [X11]='set-x11-keymap'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then
                         verb=${COMP_WORDS[i]}
                         break
diff --git a/shell-completion/bash/loginctl b/shell-completion/bash/loginctl
index 7263f7f..e7adb93 100644
--- a/shell-completion/bash/loginctl
+++ b/shell-completion/bash/loginctl
@@ -70,7 +70,7 @@ _loginctl () {
                 [ATTACH]='attach'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl
index 232d2d6..dc7ef66 100644
--- a/shell-completion/bash/systemctl
+++ b/shell-completion/bash/systemctl
@@ -146,7 +146,7 @@ _systemctl () {
                   [TARGETS]='set-default'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze
index 98c793b..6afcd96 100644
--- a/shell-completion/bash/systemd-analyze
+++ b/shell-completion/bash/systemd-analyze
@@ -39,7 +39,7 @@ _systemd_analyze() {
 
         _init_completion || return
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}
diff --git a/shell-completion/bash/timedatectl b/shell-completion/bash/timedatectl
index c6a6545..1a0acc6 100644
--- a/shell-completion/bash/timedatectl
+++ b/shell-completion/bash/timedatectl
@@ -52,7 +52,7 @@ _timedatectl() {
                      [TIME]='set-time'
         )
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]}; then
                         verb=${COMP_WORDS[i]}
                         break
diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm
index d58cdf5..b828b8d 100644
--- a/shell-completion/bash/udevadm
+++ b/shell-completion/bash/udevadm
@@ -36,7 +36,7 @@ _udevadm() {
 
         local verbs=(info trigger settle control monitor hwdb test-builtin test)
 
-        for ((i=0; i <= COMP_CWORD; i++)); do
+        for ((i=0; i < COMP_CWORD; i++)); do
                 if __contains_word "${COMP_WORDS[i]}" "${verbs[@]}" &&
                  ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
                         verb=${COMP_WORDS[i]}



More information about the systemd-commits mailing list