Mailinglist Archive: opensuse-buildservice (226 mails)

< Previous Next >
Re: [opensuse-buildservice] extending the /source/project backend call
On 2011-09-01 16:18:44 +0200, Michael Schroeder wrote:
On Thu, Sep 01, 2011 at 03:37:40PM +0200, Marcus Hüwe wrote:
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?:)

Ah, actually the sourceinfo stuff is used by the licence checker.
So you should not change the meaning of srcmd5 and xsrcmd5.

Ok.

And srcmd5 should aways reflect the source that was used for
the parsing, so you need to do it in some other way.

Ok.

(Currently, asking for sourceinfo always gives you the "expand=1"
view, so you may want to add a "lsrcmd5".)

I just adapted the patch so that the local (aka "unexpanded") rev is
stored in the lsrcmd5 attribute (if the package is a link).
Thanks for your feedback!

Is the attached patch ok?


Marcus
diff --git a/src/backend/BSXML.pm b/src/backend/BSXML.pm
index c58dfe3..fa4a899 100644
--- a/src/backend/BSXML.pm
+++ b/src/backend/BSXML.pm
@@ -406,6 +406,7 @@ our $sourceinfo = [
'rev',
'vrev',
'srcmd5',
+ 'lsrcmd5',
'verifymd5',
[],
'filename',
diff --git a/src/backend/bs_srcserver b/src/backend/bs_srcserver
index 98a4536..7b62578 100755
--- a/src/backend/bs_srcserver
+++ b/src/backend/bs_srcserver
@@ -6259,6 +6259,7 @@ sub sourceinfo {
$r->{'error'} = $files || 'could not get file list';
return $r;
}
+ $r->{'lsrcmd5'} = $r->{'srcmd5'};
$r->{'srcmd5'} = $rev->{'srcmd5'};
my $meta = '';
$meta .= "$files->{$_} $_\n" for sort keys %$files;
< Previous Next >
Follow Ups