Mailinglist Archive: opensuse-buildservice (251 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] Branching from linked projects (2.0.6)
- From: Adrian Schröter <adrian@xxxxxxx>
- Date: Thu, 30 Sep 2010 16:52:30 +0200
- Message-id: <201009301652.30385.adrian@xxxxxxx>
Am Donnerstag, 30. September 2010, 15:43:37 schrieb Anas Nashif:
okay, take two ... much simpler ...
--
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
diff --git a/src/api/app/controllers/source_controller.rb
b/src/api/app/controllers/source_controller.rb
index bd17432..01fc733 100644
--- a/src/api/app/controllers/source_controller.rb
+++ b/src/api/app/controllers/source_controller.rb
@@ -247,7 +247,10 @@ class SourceController < ApplicationController
return
end
- if pkg.nil?
+ if ['branch'].include?(cmd)
+ dispatch_command
+ return
+ elsif pkg.nil?
unless @http_user.can_modify_project?(prj)
render_error :status => 403, :errorcode =>
"cmd_execution_no_permission",
:message => "no permission to execute command '#{cmd}' for not
existing package"
On 2010-09-30, at 9:46 AM, Adrian Schröter wrote:
Am Donnerstag, 30. September 2010, 10:36:02 schrieb Anas Nashif:
...
On 2010-09-30, at 9:31 AM, Adrian Schröter wrote:
I see the bug ...
However, I would like to avoid to apply the fix in 2.0 branch, because it
is large and I would
also need to backport quite some test cases to avoid regressions.
It definitive works in 2.1 already, is it an option to wait for that for
you ?
I already applied a local hack, but would prefer to backport a real
solution until we move to 2.1 since this is required for us now.
Hm, please test the applied patch (I have not tested it at all).
It would be a minimal invasive (but also not cover all cases, for example
when target package exists already), but should work in most cases.
Does not work :(
okay, take two ... much simpler ...
--
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
diff --git a/src/api/app/controllers/source_controller.rb
b/src/api/app/controllers/source_controller.rb
index bd17432..01fc733 100644
--- a/src/api/app/controllers/source_controller.rb
+++ b/src/api/app/controllers/source_controller.rb
@@ -247,7 +247,10 @@ class SourceController < ApplicationController
return
end
- if pkg.nil?
+ if ['branch'].include?(cmd)
+ dispatch_command
+ return
+ elsif pkg.nil?
unless @http_user.can_modify_project?(prj)
render_error :status => 403, :errorcode =>
"cmd_execution_no_permission",
:message => "no permission to execute command '#{cmd}' for not
existing package"
| < Previous | Next > |