On 11/01/2012 01:59 PM, Tomas Lestach wrote:
> On Wednesday 31 of October 2012 15:00:48 Johannes Renner wrote:
>> Hello,
>>
>> We found that the list of installable packages for a given system differs if
>> you either ask the API (via system.listLatestInstallablePackages) or if you
>> go to the Web UI (Systems -> [choose a system] -> Software -> Packages ->
>> Install).
>>
>> After looking into it, I found there is two different queries used for this
>> (both to be found in Package_queries.xml):
>>
>> 1. system_latest_all_available_packages (API)
>> 2. system_available_packages (Web UI)
>>
>> My questions:
>>
>> - Query (1.) seems to return all available versions of a package, which
>> means 'all' rather than 'latest'? I think we could have two separate API
>> calls, one for 'latest' and one for 'all', but 'latest_all'?
>
> Right, the naming is strange.
>
>> - Shouldn't we use the same query for API and Web UI in order to get the
>> same results here?
>
> I'd say we do not want to get the same results.
> As people are used to the WebUI, they may select and install any version of
> an
> available package. I wouldn't change that.
>
> If an API is called listLatestInstallablePackages, it shall definitelly
> return
> list of *latest* installable packages.
>
> But what we could do is we can introduce a
> listAllInstallablePackages/listAvailableInstallablePackages API, that could
> reuse the WebUI query. :-)
Haha, yes, good idea ;-)
So, IIUC this is the situation summarized:
The current API call needs to continue to exist as it is, but you agree that
the naming of the API call, as well as the query name, is strange.
To fix this, we would actually rename the existing API call to something more
'correct', like e.g. 'listAllInstallablePackages'. Further we could change the
semantics of 'listLatestInstallablePackages' in a way that it reuses the WebUI
query and thus will return the same results as the WebUI itself.
The only problem is that we are most likely not supposed to change the semantics
of an existing API call, right? Is this true, even if we considered such
'unexpected' behavior as a bug?
Regards,
Johannes
--
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel