Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion salt/modules/aptpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _call_apt(args, scope=True, **kwargs):
'''
cmd = []
if scope and salt.utils.systemd.has_scope(__context__) and __salt__['config.get']('systemd.scope', True):
cmd.extend(['systemd-run', '--scope'])
cmd.extend(['systemd-run', '--scope', '--description', '"{0}"'.format(__name__)])
cmd.extend(args)

params = {'output_loglevel': 'trace',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/modules/test_aptpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def test_call_apt_in_scope(self):
with patch.dict(aptpkg.__salt__, {'cmd.run_all': MagicMock(), 'config.get': MagicMock(return_value=True)}):
aptpkg._call_apt(['apt-get', 'purge', 'vim']) # pylint: disable=W0106
aptpkg.__salt__['cmd.run_all'].assert_called_once_with(
['systemd-run', '--scope', 'apt-get', 'purge', 'vim'], env={},
['systemd-run', '--scope', '--description', '"salt.modules.aptpkg"', 'apt-get', 'purge', 'vim'], env={},
output_loglevel='trace', python_shell=False)

def test_call_apt_with_kwargs(self):
Expand Down