Skip to content

Refactor LinuxGeneralDrivelution to inherit BaseDriverUpdater #286

Description

@JusterZhu

Summary

Refactor the Linux platform driver updater to inherit from BaseDriverUpdater, eliminating duplicated pipeline code and aligning error handling with the Windows implementation.

Changes

  • LinuxGeneralDrivelution now inherits BaseDriverUpdater instead of implementing IGeneralDrivelution directly
  • Only InstallCoreAsync and platform-specific helpers (kernel module, .deb, .rpm installation) retained
  • Linux sudo permission check added as a custom pipeline step
  • Error handling unified via BaseDriverUpdater.MapExceptionToErrorInfo
  • Rollback logic unified and inherited from base class

Before / After

  • Before: ~500 lines (full pipeline, validation, error handling, file parsing)
  • After: ~200 lines (InstallCoreAsync + format-specific installers + parsing helpers)

Closes #285

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions