[opensuse-buildservice] [PATCH] [backend] added noservice parameter to sourceinfo
This enables osc to speedup "osc up" in a project working copy (in some cases) (by using the getprojectsourceinfo route). --- src/backend/bs_srcserver | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/bs_srcserver b/src/backend/bs_srcserver index 11f9d8c..0536426 100755 --- a/src/backend/bs_srcserver +++ b/src/backend/bs_srcserver @@ -7602,14 +7602,14 @@ sub sourceinfo { } my $linkinfo = {}; $files = lsrev($rev, $linkinfo); - if ($linkinfo->{'xservicemd5'}) { + if ($linkinfo->{'xservicemd5'} && !$cgi->{'noservice'}) { $files = handleservice($rev, $files, $linkinfo->{'xservicemd5'}); $r->{'srcmd5'} = $rev->{'srcmd5'}; } my $meta = ''; $meta .= "$files->{$_} $_\n" for sort keys %$files; $r->{'verifymd5'} = Digest::MD5::md5_hex($meta); - die("source update running\n") if $files->{'_service'} && -e "$eventdir/service/${projid}::$packid"; + die("source update running\n") if $files->{'_service'} && -e "$eventdir/service/${projid}::$packid" && !$cgi->{'noservice'}; die("source update failed\n") if $files->{'_service_error'}; }; $r->{'originproject'} = $rev->{'originproject'} if $rev && $rev->{'originproject'}; @@ -7855,7 +7855,7 @@ my $dispatches = [ 'POST:/source/$project cmd=undelete user:? comment:?' => \&undeleteproject, 'POST:/source/$project cmd=copy user:? comment:? oproject:project withbinaries:bool? withhistory:bool? makeolder:bool? resign:bool? noservice:bool?' => \©project, 'POST:/source/$project cmd: *:*' => \&unknowncmd, - '/source/$project view=info parse:bool? nofilename:bool? repository? arch? package* withchangesmd5:bool?' => \&getprojectsourceinfo, + '/source/$project view=info parse:bool? nofilename:bool? repository? arch? package* withchangesmd5:bool? noservice:bool?' => \&getprojectsourceinfo, '/source/$project deleted:bool? expand:bool? noorigins:bool?' => \&getpackagelist, 'DELETE:/source/$project user:? comment:? requestid:num?' => \&delproject, @@ -7887,7 +7887,7 @@ my $dispatches = [ 'PUT:/source/$project/$package cmd: rev? user:? comment:?' => \&sourcecommitfilelist, # obsolete - '/source/$project/$package view=info rev? linkrev? parse:bool? nofilename:bool? repository? arch? withchangesmd5:bool?' => \&getpackagesourceinfo, + '/source/$project/$package view=info rev? linkrev? parse:bool? nofilename:bool? repository? arch? withchangesmd5:bool? noservice:bool?' => \&getpackagesourceinfo, '/source/$project/$package rev? linkrev? emptylink:bool? deleted:bool? expand:bool? view:? extension:? lastworking:bool? withlinked:bool? meta:bool? product:?' => \&getfilelist, '/source/$project/$package/_history rev? meta:bool? deleted:bool? limit:num?' => \&getpackagehistory, '/source/$project/$package/_meta rev? expand:bool? meta:bool? deleted:bool?' => \&getpackage, -- 1.7.3.4 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2014-06-16 00:29:45 +0200, Marcus Huewe wrote:
This enables osc to speedup "osc up" in a project working copy (in some cases) (by using the getprojectsourceinfo route). --- src/backend/bs_srcserver | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Any comments/objections to this patch? If preferred, I can also create a pull request on github. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Thu, Jul 24, 2014 at 11:11:35AM +0200, Marcus Hüwe wrote:
On 2014-06-16 00:29:45 +0200, Marcus Huewe wrote:
This enables osc to speedup "osc up" in a project working copy (in some cases) (by using the getprojectsourceinfo route). --- src/backend/bs_srcserver | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Any comments/objections to this patch? If preferred, I can also create a pull request on github.
No complaints from my side, except that I'm not 100% happy about the name "noservice", as noservice is already used in all the commit routes to mean "noservicerun". So I'm considering "ignoreservice" or "skipservice" or something like that. (I'm also wondering if there shouldn't be an option to turn off link expansion.) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2014-07-24 11:23:34 +0200, Michael Schroeder wrote:
On Thu, Jul 24, 2014 at 11:11:35AM +0200, Marcus Hüwe wrote:
On 2014-06-16 00:29:45 +0200, Marcus Huewe wrote:
This enables osc to speedup "osc up" in a project working copy (in some cases) (by using the getprojectsourceinfo route). --- src/backend/bs_srcserver | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Any comments/objections to this patch? If preferred, I can also create a pull request on github.
No complaints from my side, except that I'm not 100% happy about the name "noservice", as noservice is already used in all the commit routes to mean "noservicerun". So I'm considering "ignoreservice" or "skipservice" or something like that.
Ok. Then I'll change it to "ignoreservice" (ignore* is already used in some of the backend routes).
(I'm also wondering if there shouldn't be an option to turn off link expansion.)
For my use case this is not necessarily needed. If you like, I can also add a something like a "noexpand" parameter (tbh I would prefer something like an "expand" parameter to explicitly enable link expansion, because this would be consistent with all other routes where we have a parameter to control link expansion) - but this would change sourceinfo's default behavior... Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Thu, Jul 24, 2014 at 12:17:01PM +0200, Marcus Hüwe wrote:
For my use case this is not necessarily needed. If you like, I can also add a something like a "noexpand" parameter (tbh I would prefer something like an "expand" parameter to explicitly enable link expansion, because this would be consistent with all other routes where we have a parameter to control link expansion) - but this would change sourceinfo's default behavior...
"expand" is both service and link expansion, so should "noexpand" disable both? Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2014-07-24 12:51:13 +0200, Michael Schroeder wrote:
On Thu, Jul 24, 2014 at 12:17:01PM +0200, Marcus Hüwe wrote:
For my use case this is not necessarily needed. If you like, I can also add a something like a "noexpand" parameter (tbh I would prefer something like an "expand" parameter to explicitly enable link expansion, because this would be consistent with all other routes where we have a parameter to control link expansion) - but this would change sourceinfo's default behavior...
"expand" is both service and link expansion, so should "noexpand" disable both?
Hmm right, I didn't thought about that. If we use "noexpand", then it should disable both (IMHO). Do you have a specific use case to disable link expansion or is it just for "performance" reasons? Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Thu, Jul 24, 2014 at 01:59:34PM +0200, Marcus Hüwe wrote:
On 2014-07-24 12:51:13 +0200, Michael Schroeder wrote:
On Thu, Jul 24, 2014 at 12:17:01PM +0200, Marcus Hüwe wrote:
For my use case this is not necessarily needed. If you like, I can also add a something like a "noexpand" parameter (tbh I would prefer something like an "expand" parameter to explicitly enable link expansion, because this would be consistent with all other routes where we have a parameter to control link expansion) - but this would change sourceinfo's default behavior...
"expand" is both service and link expansion, so should "noexpand" disable both?
Hmm right, I didn't thought about that. If we use "noexpand", then it should disable both (IMHO). Do you have a specific use case to disable link expansion or is it just for "performance" reasons?
I've got no use case. I'm ok with just adding "noservice" or "ignoreservice" for now. M. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Marcus Huewe
-
Marcus Hüwe
-
Michael Schroeder