Mailinglist Archive: opensuse-buildservice (226 mails)

< Previous Next >
Re: [opensuse-buildservice] extending the /source/project backend call
On 2011-08-23 15:44:04 +0200, Marcus Hüwe wrote:
On 2011-08-03 09:15:20 +0200, Michael Schroeder wrote:
On Tue, Aug 02, 2011 at 08:41:31PM +0200, Marcus Hüwe wrote:
what about extending the /source/project backend call with an
additional "withsrcmd5" query parameter? Instead of the plain
package list it will return also the latest srcmd5 for each
This call can be used by osc to check which packages in a local
project have to be updated. It would probably speed up the
update process for large projects because osc only needs to
do one http request (instead one for each package) in order
to decide if a package has to be updated or not.

Something like this already exists: you get a "sourceinfolist"
if you do a view=info request on a project. The API currently
blocks this, though, as there's code missing that filters out
packages where the requester has no access rights.

That's what I was looking for:) In the meantime the API also supports
the "view" parameter (see 3d15d72230a43454c621a7c8ce8ffe94d4bfe507).

A drawback is that this call might be a bit "expensive" because
for each package the getfilelist() function has to be called
(a simple getrev() for each package won't work with links or

That actually depends a bit on your osc settings: Depending on
whether you want expanded/unexpanded/baserev expanded checkouts,
you need a different srcmd5. view=info currently returns the
expanded version (i.e. the version used for building the package).

I just extended "sub sourceinfo" so that it stores the srcmd5 and
the xsrcmd5 (if present). It seems the sourceinfo stuff isn't used
at the moment (at least I didn't find anything in backend/api code)
so the change shouldn't break anything.

Is the attached patch ok?

Just a small ping - any objections?:)

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups