Resolve should also return a "newest" flag in addition to "installed" #116
Comments
purpleidea
commented
Mar 5, 2016
|
@ximion from IRC also suggested that this might be a useful thing that could be returned here: https://github.com/hughsie/PackageKit/blob/master/lib/packagekit-glib2/pk-enum.h#L370 There doesn't seem to be a "newest" flag. /cc @hughsie |
|
Newest isn't the info (the info is supposed to remain stable between resolve's with different filtering). The info field also isn't a bitfield, it's a enum. If you want to get the newest package then you need to resolve with the NEWEST filter set. |
purpleidea
commented
Mar 7, 2016
|
@hughsie But after you've resolved, how can you filter or compare two packages? The use case being to do one big resolve and then do some client side filtering... |
|
The idea is to avoid client side filtering; if you assume that you can do a rpmdevcmp on the returned versions on all backends then you might be disappointed with the results. |
purpleidea commentedMar 5, 2016
When you make a call to Resolve, it also returns a bunch of "flags" for each entry, such as "installed" or not.
It would also be particularly useful to return "newest" flags, so that a resolve call for many packages could be made, but you could also discern which one of each package is the newest one. This would be particularly useful since there aren't compare (cmp) functions easily available for each backend that the clients could call client side.
This feature would be particularly useful for https://github.com/purpleidea/mgmt/
I'm willing to sponsor this partially (somehow) if someone will write it.
Thanks,
James