Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenient doctor #13804

Merged
merged 2 commits into from
Jul 31, 2021
Merged

Lenient doctor #13804

merged 2 commits into from
Jul 31, 2021

Conversation

RuRo
Copy link

@RuRo RuRo commented Jul 30, 2021

Description

qmk doctor is a bit too strict on a couple of issues, which can lead to false-positive warnings:

  1. To determine if the qmk_firmware home is a git repository, the doctor checks, if ${QMK_FIRMWARE}/.git is a directory. However, if qmk_firmware is a git submodule, then .git will be a file instead of a directory. This PR relaxes the requirement, allowing .git to be a file.

  2. When checking for the installed udev rules, the doctor searches only in /etc/udev/rules.d/*.rules. According to man udev, this isn't the only directory, where udev rules can be located:

    RULES FILES
           The udev rules are read from the files located in the system rules directories /usr/lib/udev/rules.d
           and /usr/local/lib/udev/rules.d, the volatile runtime directory /run/udev/rules.d and the local
           administration directory /etc/udev/rules.d.
    

    In particular, the official arch/manjaro qmk package places the udev rules into /usr/lib/udev/rules.d/50-qmk.rules, leading to a false positive. This PR makes the doctor also search for udev rules in /usr/lib/udev/rules.d/, /usr/local/lib/udev/rules.d/ and /run/udev/rules.d/.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added cli qmk cli command python labels Jul 30, 2021
@tzarc tzarc requested a review from a team July 31, 2021 00:31
@RuRo RuRo changed the base branch from master to develop July 31, 2021 01:11
lib/python/qmk/cli/doctor/check.py Outdated Show resolved Hide resolved
lib/python/qmk/cli/doctor/linux.py Outdated Show resolved Hide resolved
@drashna drashna merged commit 52dad23 into qmk:develop Jul 31, 2021
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli qmk cli command python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants