-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Filter between mirrors #608
base: master
Are you sure you want to change the base?
Conversation
Thanks, looks interesting! |
a9475a3
to
de1dd82
Compare
Nice. I have rebased the PR to fix the merge conflicts. |
I tried the patch with my use case and it worked well-- looking forward to the feature. It's been a while since the last rebase, would you run again? |
Is this patch available for aptly version 1.5.0? I tried to merge the mswart:filter-between-mirrors branch over aptly-dev:v1.5.0 and got a few conflicts, mainly in the api code. |
Hi ! It looks like this was never merge, just closed probably.. should we reopen this ? |
It's up to the aptly-developers, I guess. And I think a new merge req is needed since this one won't fit with newer versions of aptly. I'm using the filter-between-mirrors functionaliy actively, so I'll need it in later versions. But first, I can ask mswart if he would like to maintain his branch and make it compatible with v1.5. |
that would be great... let's have a look at how good it rebases... |
1ddd140
to
b81fb08
Compare
rebased... |
does not seem to build anymore on master |
I managed to fix the build and the tests :) coverage is low, so we need more tests: 38.52% of diff hit (target 74.84%) @mswart I know it has been years, would you still be interested in taking this further ? |
Distributions contain a hugh set of packages, mirroring them requires a large amount of storage and bandwidth. To mitigate this issues aptly provides an filter feature to reduce the set of mirrored packages. Especially it supports to limit the downloaded packages to a set of packages and their needed dependencies as well. As this filter is self-contained within each mirror, it has two limitations: 1. its difficult to partial mirror a security or updates mirror to match a filtered main repository. Update and security repositories contain (newer) packages for a (small) subset of the whole distribution to fix bugs/security issues. As the repository contains not all packages, filtering breaks due to cuts within the dependency tree. 2. integration of packages from other sources It is not possible to filter for all dependencies of a package if this package itself is not part of the mirror repository but instead published within another (local) repository. In both cases all dependencies between repositories/mirrors have to be included manually in the mirror filter. This commit introduces `-deps-from-mirrors` and `-deps-from-repos` options for mirrors. They are comma-separated lists referencing mirror/repository names. If `-filter-with-deps` is activated all dependencies of packages from the references mirrors/repositories that are part of the current mirror are included in addition to the filter result itself. This resolves 2. If in addition `-dep-follow-all-variants` is activated, all packages that are included in the refereneced mirrors/repositories and present in the current mirror (matched by package name only) are selected to download, too. This resolves 1.
8842543
to
e99efca
Compare
rebased on master... |
Fixes #357
Description of the Change
Distributions contain a huge set of packages, mirroring them requires a large amount of storage and bandwidth. To mitigate this issues aptly provides an filter feature to reduce the set of mirrored packages. Especially it supports to limit the downloaded packages to a set of packages and their needed dependencies as well.
As this filter is self-contained within each mirror, it has two limitations:
its difficult to partial mirror a security or updates mirror to match a filtered main repository. Update and security repositories contain (newer) packages for a (small) subset of the whole distribution to fix bugs/security issues. As the repository contains not all packages, filtering breaks due to cuts within the dependency tree.
integration of packages from other sources. It is not possible to filter for all dependencies of a package if this package itself is not part of the mirror repository but instead published within another (local) repository.
In both cases all dependencies between repositories/mirrors have to be included manually in the mirror filter.
This commit introduces
-deps-from-mirrors
and-deps-from-repos
options for mirrors. They are comma-separated lists referencing mirror/repository names.If
-filter-with-deps
is activated all dependencies of packages from the references mirrors/repositories that are part of the current mirror are included in addition to the filter result itself. This resolves 2.If in addition
-dep-follow-all-variants
is activated, all packages that are included in the referenced mirrors/repositories and present in the current mirror (matched by package name only) are selected to download, too. This resolves 1.Limitations / Questions
Checklist
AUTHORS