Re: [Intel-gfx] [PATCH] dim: Continue also for dry runs

2017-08-07 Thread Daniel Vetter
On Thu, Aug 3, 2017 at 2:44 PM, Jani Nikula  wrote:
> On Thu, 27 Jul 2017, Daniel Vetter  wrote:
>> It's a bit silly to have to spec both -d and -f to see what dim would
>> all complain about. And dry-run should never cause bad side-effects.
>
> Ack.
>
> We don't do dry-run all that well in general, partly because you need to
> have one part actually succeed to make the rest succeed. And some things
> don't do dry-run at all. Those could bail out with an error right
> away. To the endless todo list...

Yeah, one of the biggest things I'd like to see is dim push-branch not
pushing until the dry-run (and entirely offline) rebuild-tip
succeeded. I think otherwise we're fairly good with dry-runs ...
-Daniel

>
> BR,
> Jani.
>
>>
>> Signed-off-by: Daniel Vetter 
>> ---
>>  dim | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/dim b/dim
>> index c0cbe352b165..96aaf7101d6b 100755
>> --- a/dim
>> +++ b/dim
>> @@ -126,6 +126,8 @@ function warn_or_fail
>>  {
>>   if [[ $FORCE ]] ; then
>>   echoerr "WARNING: $1, but continuing"
>> + elif [[ $DRY ]] ; then
>> + echoerr "WARNING: $1, but continuing dry-run"
>>   else
>>   echoerr "ERROR: $1, aborting"
>>   exit 1
>
> --
> Jani Nikula, Intel Open Source Technology Center



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [Intel-gfx] [PATCH] dim: Continue also for dry runs

2017-08-03 Thread Jani Nikula
On Thu, 27 Jul 2017, Daniel Vetter  wrote:
> It's a bit silly to have to spec both -d and -f to see what dim would
> all complain about. And dry-run should never cause bad side-effects.

Ack.

We don't do dry-run all that well in general, partly because you need to
have one part actually succeed to make the rest succeed. And some things
don't do dry-run at all. Those could bail out with an error right
away. To the endless todo list...

BR,
Jani.

>
> Signed-off-by: Daniel Vetter 
> ---
>  dim | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/dim b/dim
> index c0cbe352b165..96aaf7101d6b 100755
> --- a/dim
> +++ b/dim
> @@ -126,6 +126,8 @@ function warn_or_fail
>  {
>   if [[ $FORCE ]] ; then
>   echoerr "WARNING: $1, but continuing"
> + elif [[ $DRY ]] ; then
> + echoerr "WARNING: $1, but continuing dry-run"
>   else
>   echoerr "ERROR: $1, aborting"
>   exit 1

-- 
Jani Nikula, Intel Open Source Technology Center
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] dim: Continue also for dry runs

2017-07-27 Thread Daniel Vetter
It's a bit silly to have to spec both -d and -f to see what dim would
all complain about. And dry-run should never cause bad side-effects.

Signed-off-by: Daniel Vetter 
---
 dim | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dim b/dim
index c0cbe352b165..96aaf7101d6b 100755
--- a/dim
+++ b/dim
@@ -126,6 +126,8 @@ function warn_or_fail
 {
if [[ $FORCE ]] ; then
echoerr "WARNING: $1, but continuing"
+   elif [[ $DRY ]] ; then
+   echoerr "WARNING: $1, but continuing dry-run"
else
echoerr "ERROR: $1, aborting"
exit 1
-- 
2.13.3

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel