Repository navigation
Does aptly mirror update -latest behave like a filter?
#1649
|
We've been using I then noticed published snapshots of mirrors with -latest only had the latest package in their pool, regardless of whether the others were still present on filesystem. The mirror itself reflects that in its amount of packages. This is the intended behavior, correct? The relevant Pull request gave me the impression that it would merely add the latest version of the package to the mirror. In reality It acts more like a filter. As a write this, I kind of understand it better why, it keeps the pool small regardless of the amount of updates over time, and saves disk space (which was primary goal I imagine). |
Replies: 1 comment
|
Yes, that's how it works. With To keep quick CVE syncs and still be able to roll back, snapshot the mirror before each There's no "keep the latest N" option today, so that part would be a feature request. |
Yes, that's how it works. With
-latest,mirror updatefilters the upstream package list down to the newest version of each name/architecture before downloading (FilterLatestindeb/list.go), and the mirror's package list is then replaced with that filtered list. So the mirror, and any snapshot you take from it afterwards, only has the latest versions. The older .deb files stay in the pool untilaptly db cleanupremoves the ones nothing references anymore.To keep quick CVE syncs and still be able to roll back, snapshot the mirror before each
-latestupdate. Older snapshots keep their versions, andsnapshot merge -no-removekeeps every version instead of replacing older ones: