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

Deb822 prologue: refactorings #203

Merged
merged 7 commits into from
Jul 13, 2023
Merged

Deb822 prologue: refactorings #203

merged 7 commits into from
Jul 13, 2023

Commits on Jul 13, 2023

  1. apt_dpkg: tests: teach _write_source_file about PPAs

    This centralizes where we write single-line APT sources files in the
    tests.
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    5535ca3 View commit details
    Browse the repository at this point in the history
  2. apt_dpkg: prepare the test suite to handle multiple source styles

    We only implement the one-line style for now, but deb822 is coming.
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    309f00f View commit details
    Browse the repository at this point in the history
  3. apt_dpkg: inspect the entire sources dir for the primary mirror heuri…

    …stic
    
    This commit splits out the gathering of the data from the actual
    heuristic implementation (which could hardly be simpler)
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    d06f4c6 View commit details
    Browse the repository at this point in the history
  4. apt_dpkg: sandbox: pivot around the apt conf dir rather than source.list

    In the brave new world of deb822, there might not *be* a source.list
    file that we can rely on!!
    
    Note that this drops an early check for the existence of the source.list
    file. That check was of fairly low value in terms of validating input in
    the first place (source.list could be empty or full of garbage), and
    replacing it with the apt dir would even lower that value, as the dir
    itself could be empty. In addition to that, the exception raised is too
    generic to be truly useful.
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    3f9f51a View commit details
    Browse the repository at this point in the history
  5. apt_dpkg: split off the origin PPA string analysis

    For such a tiny string, it's surprisingly complicated to find out which
    are its components!
    
    This allows us to drastically reduce the complexity of
    create_ppa_source_from_origin()
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    eac2224 View commit details
    Browse the repository at this point in the history
  6. apt_dpkg: split off the search for PPA source list

    This part is now self contained. Note that the new code is designed for
    future extension when the deb822 format support will be implemented.
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    e2c6f7e View commit details
    Browse the repository at this point in the history
  7. apt_dpkg: create_ppa_source...: return SourceEntries rather than raw …

    …string
    
    This will make things easier when we switch to produce deb822 sources
    down the road, and makes the code in the main function a bit more
    readable.
    schopin-pro committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    57ea4c2 View commit details
    Browse the repository at this point in the history