Skip to content

Add remove_scfb and remove_vesa and refactor cleanup functions#53

Merged
ericbsd merged 1 commit into
masterfrom
scfb
Mar 5, 2026
Merged

Add remove_scfb and remove_vesa and refactor cleanup functions#53
ericbsd merged 1 commit into
masterfrom
scfb

Conversation

@ericbsd
Copy link
Copy Markdown
Contributor

@ericbsd ericbsd commented Mar 5, 2026

Add remove_scfb() and remove_vesa() to uninstall xf86-video-scfb and xf86-video-vesa when a proper driver is configured. Call them in cmd_auto() for all GPU and VM detections, except hyperv and bhyve which use the scfb driver internally.

Rename all cleanup_* functions to remove_* and drop template file deletion, limiting them to package removal only. Remove cleanup_hyperv and cleanup_bhyve as they had no packages to remove.

Summary by Sourcery

Add dedicated removal functions for generic framebuffer and VESA video drivers and align cleanup naming to remove-only semantics.

New Features:

  • Introduce remove_scfb() and remove_vesa() helpers to uninstall generic framebuffer and VESA drivers when a proper GPU driver is configured.

Enhancements:

  • Invoke the new remove_scfb() and remove_vesa() functions from cmd_auto() for relevant GPU and VM detections while preserving usage for hyperv and bhyve.
  • Rename cleanup_* helpers to remove_* and narrow their responsibility to package removal only, dropping template file deletion.
  • Remove obsolete hyperv and bhyve cleanup helpers that no longer managed any packages.

Add remove_scfb() and remove_vesa() to uninstall xf86-video-scfb and
xf86-video-vesa when a proper driver is configured. Call them in
cmd_auto() for all GPU and VM detections, except hyperv and bhyve which
use the scfb driver internally.

Rename all cleanup_* functions to remove_* and drop template file
deletion, limiting them to package removal only. Remove cleanup_hyperv
and cleanup_bhyve as they had no packages to remove.
@ericbsd ericbsd requested review from a team as code owners March 5, 2026 11:55
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Mar 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors xconfig’s cleanup logic to focus solely on package removal and adds targeted removal of scfb/vesa drivers when a better GPU driver is detected, while eliminating unused hyperv/bhyve cleanup paths.

File-Level Changes

Change Details Files
Add targeted removal of scfb and vesa drivers when a proper GPU or VM driver is configured, excluding platforms that rely on scfb internally.
  • Introduce remove_scfb() helper to uninstall xf86-video-scfb when it is no longer needed.
  • Introduce remove_vesa() helper to uninstall xf86-video-vesa when it is no longer needed.
  • Invoke remove_scfb() and remove_vesa() from cmd_auto() for all GPU and VM detections that configure a proper driver, skipping hyperv and bhyve paths that depend on scfb.
bin/xconfig
Refactor cleanup_* helpers into remove_* helpers that only perform package removal and delete unused hyperv/bhyve cleanup functions.
  • Rename existing cleanup_* functions to remove_* to better reflect their responsibility.
  • Restrict these functions to package removal only by dropping template file deletion responsibilities.
  • Remove cleanup_hyperv and cleanup_bhyve functions as they did not manage any packages.
bin/xconfig

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ericbsd ericbsd merged commit de2e7a7 into master Mar 5, 2026
2 checks passed
@ericbsd ericbsd deleted the scfb branch March 5, 2026 11:57
@github-project-automation github-project-automation Bot moved this from In Review to Done in Development Tracker Mar 5, 2026
@ericbsd ericbsd self-assigned this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants