-
Notifications
You must be signed in to change notification settings - Fork 47
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
Select latest package from multiple archives #79
Closed
woky
wants to merge
3
commits into
canonical:main
from
woky:pub/slicer-multi-archive-package-selection
Closed
Select latest package from multiple archives #79
woky
wants to merge
3
commits into
canonical:main
from
woky:pub/slicer-multi-archive-package-selection
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
woky
added
Blocked
Waiting for something external
and removed
Blocked
Waiting for something external
labels
Jun 21, 2023
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
from
June 21, 2023 17:54
b11946f
to
a022ce6
Compare
This PR depends on #69 |
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
2 times, most recently
from
June 22, 2023 10:38
2cb56b4
to
cb31486
Compare
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
2 times, most recently
from
August 30, 2023 12:04
3f31d55
to
b3f7a09
Compare
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
from
September 19, 2023 06:07
b3f7a09
to
21d919f
Compare
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
3 times, most recently
from
October 9, 2023 19:15
8c43341
to
7e27954
Compare
Currently we only test with the embedded base-files files package. This quite limits what we can test. But since commit a3315e3 ("testutil/pkgdata: Create deb programatically") we have the ability to define our own custom package content. Add support for testing with custom packages. These can be defined in each test case per archive name. The content can be defined directly in test case definition with the help of testutil.MustMakeDeb(). The package content is wrapped in the testPackage structure. This introduces one level of nesting in each test case package definition. In future, we will add package metadata to the package definition, namely version. So wrapping the package content in the structure now and later just adding a new field to it the structure later will make the future diff much smaller.
At some point we will need to get information about (deb) packages from (Go) packages other than archive, namely from the slicer package. For instance: - Package entries in Chisel DB will include version, digest and architecture. - Multi-archive package selection will need to know versions of a package in all configured archives. Add Info() method to the Archive interface that returns a new PackageInfo interface that contains accessors for the underlying control.Section of the package. Currently these accessors are Name(), Version(), Arch() and SHA256() methods. The reason to introduce PackageInfo interface instead of returing control.Section directly is keep the archive abstraction and not leak implementation details.
In the future, we'd like to support different kinds of archives which have a non-empty intersection of packages. In other words, we'd like to support archives that partly override the Ubuntu archive. Currently, each sliced package is tied to an archive via the "archive" property that defaults to the default archive. Drop this link from the sliced packages to the archives and select the latest available version of the package from all configured archives. This commit, in effect, doesn't change the current behavior because we don't allow archives to define their URLs. It's only preparation for future commits that will add support for different types of archives.
woky
force-pushed
the
pub/slicer-multi-archive-package-selection
branch
from
October 12, 2023 16:40
7e27954
to
c551dc3
Compare
Per our offline discussion, I think our best way forward is to close this PR and discuss with @rebornplusplus to see if it is a priority right now, and how to amend the code here to make it compatible with the latest changes. We will take that discussion offline and we can always re-open the PRs or create new ones as we see fit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the future, we'd like to support different kinds of archives which
have a non-empty intersection of packages. In other words, we'd like to
support archives that partly override the Ubuntu archive.
Currently, each sliced package is tied to an archive via the "archive"
property that defaults to the default archive. Drop this link from the
sliced packages to the archives and select the latest available version
of the package from all configured archives.
This commit, in effect, doesn't change the current behavior because we
don't allow archives to define their URLs. It's only preparation for
future commits that will add support for different types of archives.