Repository: autokey/autokey (language: python)

Issue:
Change sudo apt to sudo apt-get in the source code
### AutoKey is a Xorg application and will not function in a Wayland session. Do you use Xorg (X11) or Wayland?

Xorg

### Has this issue already been reported?

- [X] I have searched through the existing issues.

### Is this a question rather than an issue?

- [X] This is not a question.

### What type of issue is this?

Enhancement

### Which Linux distribution did you use?

_No response_

### Which AutoKey GUI did you use?

Both

### Which AutoKey version did you use?

_No response_

### How did you install AutoKey?

_No response_

### Can you briefly describe the issue?

The source code uses `apt` in a few places where it should use `apt-get` to ensure the use of stable code and to prevent the "apt does not have a stable cli interface" warning.


### Can the issue be reproduced?

Always

### What are the steps to reproduce the issue?

_No response_

### What should have happened?

All references to **sudo apt** should be changed to **sudo apt-get** in these files:

* [/debian/build.sh](https://github.com/autokey/autokey/blob/develop/debian/build.sh)
* [github/workflows/python-test.yml](https://github.com/autokey/autokey/blob/develop/.github/workflows/python-test.yml)
* [.github/workflows/build.yml](https://github.com/autokey/autokey/blob/develop/.github/workflows/build.yml)
* [INSTALL](https://github.com/autokey/autokey/blob/develop/INSTALL)


### What actually happened?

_No response_

### Do you have screenshots?

_No response_

### Can you provide the output of the AutoKey command?

_No response_

### Anything else?

_No response_


Discussion / hints:
This should happen in **master** and **develop** and **beta** since it affects each of them.


Fix patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e2e3b056..7fbc61eb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,8 +38,8 @@ jobs:
           ${{ runner.os }}-
     - name: Install dependencies
       run: |
-        sudo apt update
-        sudo apt install $(cat apt-requirements.txt)
+        sudo apt-get update
+        sudo apt-get install $(cat apt-requirements.txt)
         python -m pip install --upgrade pip
         pip install flake8 pytest pytest-cov wheel
         pip install -r pip-requirements.txt
@@ -85,8 +85,8 @@ jobs:
 
     - name: Install dependencies
       run: |
-        sudo apt update
-        sudo apt install $(cat apt-requirements.txt)
+        sudo apt-get update
+        sudo apt-get install $(cat apt-requirements.txt)
         python -m pip install --upgrade pip
         pip install build
 
diff --git a/INSTALL b/INSTALL
index 4fabec12..a965b1aa 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,4 +15,4 @@ Or the Qt version:
 sudo dpkg --install autokey-qt_<version>.deb autokey-common_<version>.deb
 
 After dpkg finished, run this to install any missing dependencies:
-sudo apt install -f
+sudo apt-get install -f
diff --git a/debian/build.sh b/debian/build.sh
index 312dff32..067c0508 100755
--- a/debian/build.sh
+++ b/debian/build.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 [ -f debian/build_requirements.txt ] && \
-  cat debian/build_requirements.txt | xargs sudo apt install -y
+  cat debian/build_requirements.txt | xargs sudo apt-get install -y
 
 VERSION=$(git describe --tags --abbrev=0 --match "v*.*.*")
 # Strip leading 'v' because that is invalid as a debian version number


Test patch:
diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml
index 63c51be3..63aa111d 100644
--- a/.github/workflows/python-test.yml
+++ b/.github/workflows/python-test.yml
@@ -43,8 +43,8 @@ jobs:
 
       - name: Install dependencies
         run: |
-          sudo apt update
-          sudo apt install $(cat apt-requirements.txt)
+          sudo apt-get update
+          sudo apt-get install $(cat apt-requirements.txt)
           python -m pip install --upgrade pip
           pip install flake8 wheel
           pip install -r pip-requirements.txt
@@ -107,8 +107,8 @@ jobs:
 
       - name: Install dependencies
         run: |
-          sudo apt update
-          sudo apt install $(cat apt-requirements.txt)
+          sudo apt-get update
+          sudo apt-get install $(cat apt-requirements.txt)
           python -m pip install --upgrade pip
           pip install flake8 tox pytest pytest-cov wheel
           pip install -r pip-requirements.txt
@@ -153,8 +153,8 @@ jobs:
 
       - name: Install OS dependencies only
         run: |
-          sudo apt update
-          sudo apt install $(cat apt-requirements.txt)
+          sudo apt-get update
+          sudo apt-get install $(cat apt-requirements.txt)
           python -m pip install --upgrade pip
           pip install dbus-python gobject pygobject PyQt5 qscintilla
       - name: Test installation