← Back to issue list

[wip] repo: consolidate BaseRepo and Ubuntu & reorganize package

View original Github issue

Metadata

Project
snapcraft
Number
#3256
Type
pull request
State
closed
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Closed as stale after a reviewer flagged missing platform guards and error handling. The author was asked to reopen it when ready, but it was never merged or updated.

Suggested action:

No scores available.

Issue body

There has been a long-running sync between abstract "BaseRepo" and "Ubuntu". The goal of the abstraction was to support multiple OSes, but the reality of the snapcraft codebase today is that nearly every usage of repo assumes Ubuntu (or at least debian/apt). This drops the abstract "BaseRepo" and makes usage of repositories explicitly tied to AptRepo. Should the future support additional repository types, we would need to do a lot more work to address the split, as it's not as trivial as picking a repo per-platform. - Drop DummyRepo. - Drop repo._platform. - Rename repo._deb to repo.apt. - Create new repo.fixups module for the various fixup helpers, moving fix_pkg_config and _fix_file_mode into it. More should be moved out of AptRepo in the future. - Consolidate remaining repo._base utilities into repo.apt. - Replace usage of "repo.Repo" with "repo.AptRepo" - Replace usage of "repo.Ubuntu" with "repo.AptRepo" This addresses import errors for "Ubuntu" on non-Ubuntu platforms, as all users of AptRepo can safely import the repo package. If there was a bug and AptRepo were to be used on non-Ubuntu platforms, it would result in an error from AptRepo being assigned None. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed as stale after a reviewer flagged missing platform guards and error handling. The author was asked to reopen it when ready, but it was never merged or updated.
qwen3.6-35b-a3b-mtp-q6 Consolidating repository abstractions into AptRepo was abandoned. A reviewer flagged missing error handling, and the PR was closed as stale without merging.
qwen3.6-35b-a3b-mtp-q6 Closed as stale without merging. Reviewers noted missing error handling and platform guards. The maintainer instructed the author to address the feedback and reopen the pull request once ready.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2992 [WIP] repo: ubuntu implementation refactoring with initial package-management snapcraft closed Closed without merging. Marked as a work-in-progress, the Ubuntu package management refactoring received no reviews or CI checks and was abandoned after minimal activity.
73%
#1104 repo: refactor into package. snapcraft closed Closed and abandoned without merging. The maintainer commented that the repository refactoring was no longer needed, halting the review process.
70%