Skip to content

Installer calls apt with wrong argument order #1038

@Flamefire

Description

@Flamefire

Bug reporting acknowledgment

Not applicable, Yes, I read it

Professional support

None

Describe the bug

The installer calls apt -y [install/purge], e.g. here:
https://github.com/glpi-project/glpi-agent/blob/ccbf107c647c62a9154ebf9ce27b755edbc6d48c/contrib/unix/installer/DebDistro.pm#L175C27-L175C39

However it needs to be e.g. apt install -y or the invocation will fail

To reproduce

sudo perl glpi-agent-1.15-linux-installer.pl --reinstall -v --typical

See output:

Found distro: Debian
Running on linux distro: Debian GNU/Linux bookworm/sid : Debian : bookworm/sid...
Disabling glpi-agent service...
Running: systemctl disable glpi-agent
Removed /etc/systemd/system/multi-user.target.wants/glpi-agent.service.
Uninstalling glpi-agent package...
Running: apt -y purge --autoremove glpi-agent 2>/dev/null

This is the Linux Mint "apt" command.

Expected behavior

Successful execution

Operating system

Linux

GLPI Agent version

v1.15

GLPI version

Not applicable

GLPIInventory plugin or other plugin version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinuxIssue occurs on linuxpackagingRelated to packaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions