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

network: fix Wi-Fi interfaces not listed in dry-run #1785

Merged
merged 2 commits into from
Sep 7, 2023

Commits on Sep 4, 2023

  1. network: fix Wi-Fi interfaces not listed in dry-run

    When a Wi-Fi interface is present in the machine configuration (e.g.,
    mwhudson.json), the GUI seemingly ignores it. This happens because there
    is a filter on the server side which only returns Wi-Fi interfaces if
    the wlan_support_install_state() function returns
    PackageInstallState.DONE.
    
    However, calling the /network endpoint shows that the state is set to
    the wrong value:
    
     {"wlan_support_install_state": "NOT_NEEDED"}
    
    This turns out to be inconsistent because:
     * we lean on a PackageInstaller instance to tell if wpasupplicant is
    installed (this is what the wlan_support_install_state() function
    reflects) ; but
     * in dry-run mode, we pretend to install wpasupplicant without
    actually relying on the PackageInstaller instance.
    
    Fixed by using the PackageInstaller instance to install the
    wpasupplicant package - with a special implementation that only pretends
    to install it. This is enough to make the PackageInstaller instance
    think the package is installed.
    
    Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
    ogayot committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    c09a32c View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. pkghelper: have alternative dry-run implementation

    Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
    ogayot committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    1670d07 View commit details
    Browse the repository at this point in the history