[opensuse-buildservice] Re: [PATCH] - allow diff against a nonexistent (source/target) project/package
On Sat, Apr 10, 2010 at 03:28:07PM +0200, OBS build-service wrote:
From: Marcus Huewe
[...] - my ($projid, $packid, $rev, $linked) = @_; + my ($projid, $packid, $rev, $linked, $missingok) = @_; my $proj = remoteprojid($projid); if (!$proj) { + return {'project' => $projid, 'package' => $packid, 'srcmd5' => 'empty'} if $missingok; [...]
What exactly are you trying to solv with that flag? Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Mon, Apr 12, 2010 at 10:38:49AM +0200, Michael Schroeder wrote:
On Sat, Apr 10, 2010 at 03:28:07PM +0200, OBS build-service wrote:
From: Marcus Huewe
[...] - my ($projid, $packid, $rev, $linked) = @_; + my ($projid, $packid, $rev, $linked, $missingok) = @_; my $proj = remoteprojid($projid); if (!$proj) { + return {'project' => $projid, 'package' => $packid, 'srcmd5' => 'empty'} if $missingok; [...] What exactly are you trying to solv with that flag?
I want to support a diff against a non-existent project/package. For instance if you create a new submitrequest which would create a new package in the target project you won't be able to view the diff because the package doesn't exist in the target project. The missingok flag is used to tell remote_getrev() not to die if the project and/or package doesn't exist. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Mon, Apr 12, 2010 at 11:39:13AM +0200, Marcus Hüwe wrote:
On Mon, Apr 12, 2010 at 10:38:49AM +0200, Michael Schroeder wrote:
On Sat, Apr 10, 2010 at 03:28:07PM +0200, OBS build-service wrote:
From: Marcus Huewe
[...] - my ($projid, $packid, $rev, $linked) = @_; + my ($projid, $packid, $rev, $linked, $missingok) = @_; my $proj = remoteprojid($projid); if (!$proj) { + return {'project' => $projid, 'package' => $packid, 'srcmd5' => 'empty'} if $missingok; [...] What exactly are you trying to solv with that flag?
I want to support a diff against a non-existent project/package. For instance if you create a new submitrequest which would create a new package in the target project you won't be able to view the diff because the package doesn't exist in the target project. The missingok flag is used to tell remote_getrev() not to die if the project and/or package doesn't exist.
Why does remote_getrev() behave different than standard getrev() in the first place? Shouldn't 'missingok' be the default? M. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Mon, Apr 12, 2010 at 12:43:27PM +0200, Michael Schroeder wrote:
On Mon, Apr 12, 2010 at 11:39:13AM +0200, Marcus Hüwe wrote:
On Mon, Apr 12, 2010 at 10:38:49AM +0200, Michael Schroeder wrote:
On Sat, Apr 10, 2010 at 03:28:07PM +0200, OBS build-service wrote:
From: Marcus Huewe
[...] - my ($projid, $packid, $rev, $linked) = @_; + my ($projid, $packid, $rev, $linked, $missingok) = @_; my $proj = remoteprojid($projid); if (!$proj) { + return {'project' => $projid, 'package' => $packid, 'srcmd5' => 'empty'} if $missingok; [...] What exactly are you trying to solv with that flag?
I want to support a diff against a non-existent project/package. For instance if you create a new submitrequest which would create a new package in the target project you won't be able to view the diff because the package doesn't exist in the target project. The missingok flag is used to tell remote_getrev() not to die if the project and/or package doesn't exist.
Why does remote_getrev() behave different than standard getrev() in the first place? Shouldn't 'missingok' be the default?
Hmm no. If getrev() is called and the project and/or package doesn't exist it calls remote_getrev(). remote_getrev() checks if the project is a remoteproject: a) project isn't a remoteproject => if "missingok" is defined and (!= 0) it returns the "dummy" hash otherwise it dies (default) b) project is a remoteproject but the rpc calls fail with status 404 => either the remoteproject or the package doesn't exist. If missingok is set the "dummy" hash is returned otherwise it dies (default) Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Marcus Hüwe
-
Michael Schroeder