aptly
aptly copied to clipboard
filter on newest version?
Detailed Description
It's great that (for example) google's google-cloud-sdk
apt repo has every version they've ever shipped. A little less great that this makes it 60G+ with 190 versions present... while it is an admirable reference, I would like to mirror it (and have been, with aptly) but only really need the newest version. Currently, I do a mirror search
and find the newest version (since they all have a common build version) and then a mirror edit -filter="Version (>= $newest_version)"
with that calculated value. Doesn't handle other repos that have disjoint versions in them, though.
Another way to look at it - can I make mirror update
only populate the pool with what snapshot publish
would put into the endpoint?
Context
Context is pre-building local mirrors for a build system VM that specifically doesn't have internet access.
Possible Implementation
Details above, but maybe just a config option to mirror create
/ mirror edit
... or possibly there's some other tool that's a better fit? Note that all of the "excess"/"historical" packages are in the Packages
file, they're not just in the pool filesystem.
Your Environment
This sounds like a aptly mirror update -latest …
option and maybe even a sane default. If you want to sync an archive-style repository, which is the the unusual case, maybe that should be an create
/edit
option.
Though introducing this without changing the default and maybe emitting a warning if you have not decided on the behaviour would be the way to go for now.
The client does only consider the latest version unless explicitly told to do otherwise too, it seems the most expected outcome that aptly just behaves as APT does.
Any news on whether this is planned to be implemented or not?
I stumbled upon this issue while looking for a way to mirror only the latest version of a package, in a repo that has thousands of versions of it.
+1 I just hit this with hashicorp's consul repo