[systemd-devel] [PATCH] Fix assertions while disabling unexisting target units

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Jul 14 06:56:07 PDT 2013


Can you be a bit more explicit, how was this condition triggered?

Zbyszek

On Sun, Jul 14, 2013 at 01:45:17PM +0300, Oleksii Shevchuk wrote:
> ---
>  src/shared/install.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/shared/install.c b/src/shared/install.c
> index 1161068..c1a5ce0 100644
> --- a/src/shared/install.c
> +++ b/src/shared/install.c
> @@ -1414,7 +1414,7 @@ static int install_context_mark_for_removal(
>                  assert_se(hashmap_move_one(c->have_installed, c->will_install, i->name) == 0);
>  
>                  q = unit_file_search(c, i, paths, root_dir, false);
> -                if (q == -ENOENT) {
> +                if (q == -ENOENT && i->path) {
>                          /* do nothing */
>                  } else if (q < 0) {
>                          if (r >= 0)


More information about the systemd-devel mailing list