#1070023 dict-freedict-eng-jpn: Failure to stop dictd.service on purge even if unit is not loaded

#1070023#5
Date:
2024-04-28 19:37:25 UTC
From:
To:
Dear Maintainer,

when uninstalling (purging) the package, I got the following error message:

Failed to stop dictd.service: Unit dictd.service not loaded.
invoke-rc.d: initscript dictd, action "stop" failed.

Apt reports that the subprocess returned error code 5 (five).

I did not have dictd running as a service, so this error was unexpected,
but I got it regardless.  The package seems to have been purged successfully
anyway.  Thus, it is only a minor annoyance, but the post-build script should
check properly whether dictd.service is actually running before attempting
to stop it.

#1070023#10
Date:
2024-04-29 06:00:24 UTC
From:
To:
Hi
        if command -v dictdconfig # update dictd's DB
        then
            dictdconfig -w
        fi
        if dpkg -s dictd 2> /dev/null|grep -qe '^Status:.*installed'
        then
            invoke-rc.d dictd stop
            invoke-rc.d dictd start
        fi

What is the output of
    dpkg -s dictd 2> /dev/null|grep -qe '^Status:.*installed'

and return code?

Cheers
Sebastian

#1070023#15
Date:
2024-04-29 06:00:24 UTC
From:
To:
Hi
        if command -v dictdconfig # update dictd's DB
        then
            dictdconfig -w
        fi
        if dpkg -s dictd 2> /dev/null|grep -qe '^Status:.*installed'
        then
            invoke-rc.d dictd stop
            invoke-rc.d dictd start
        fi

What is the output of
    dpkg -s dictd 2> /dev/null|grep -qe '^Status:.*installed'

and return code?

Cheers
Sebastian