aptly icon indicating copy to clipboard operation
aptly copied to clipboard

Keep only latest version of package

Open Tom-alreadytaken opened this issue 10 years ago • 5 comments

When I have a snapshot from a given repo and want to merge it ( -latest ) with a snapshot from my security-mirror, then I would like to get a resulting snapshot with the same packages as in my original repo-snapshot, only having the latest version of each package in there. Instead, atply is merging all packages from the security snapshot into the resilting snapshot. So what I ask for is an additional option to "aptly snapshot merge -latest", like "leftsidemerge", which result in aptly taking the list of packages from the first given snapshot and only add newer version of these packages from the following snapshots to the resulting snapshot, ingnoring all other packes in the the other snapshots.

Tom-alreadytaken avatar May 18 '15 08:05 Tom-alreadytaken

Some work has been started in https://github.com/aptly-dev/aptly/tree/package-version-slice to expand filter command but unfortunately hasn't been finished yet. If some is keen to pick up the pieces would be appreciated.

sliverc avatar Jun 18 '18 13:06 sliverc

That's something I started, but I got stuck around the evaluation of the query. Any other kind of query could be executed both for the package list and for one package, but package version slice operator should work only on package lists. So if that operator is used, query should be applied only to package lists, which probably implies that it can't be combined with 'not' operator.

smira avatar Jun 18 '18 21:06 smira

@lbolla, has this been fixed? If yes, how?

andrewshadura avatar Jan 28 '22 08:01 andrewshadura

@andrewshadura I suspect this was closed by mistake, as there were indeed recent comments.

lbolla avatar Jan 28 '22 12:01 lbolla

Would be a great feature!

nook24 avatar Aug 29 '23 13:08 nook24