public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mksetupini does not return error code
@ 2017-11-29 14:58 Ivan Gagis
  2017-11-29 16:56 ` Jon Turney
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Gagis @ 2017-11-29 14:58 UTC (permalink / raw)
  To: The Cygwin Mailing List

Hi,

I found that in case packages validation fails the mksetup script just
returns success, though it prints a line in the console saying
"mksetupini: package set has errors, not writing setup.ini".

I think it should return some error code so that it would not be
considered as success by CI scripts where mksetupini is called from.

The problematic lines are as following:

https://cygwin.com/git/?p=cygwin-apps/calm.git;a=blob;f=calm/mksetupini.py;h=f24e4c5751e1f7e13516e8689c041403ba1f8d38;hb=HEAD#l63
returns nothing, should return non-zero error code.

https://cygwin.com/git/?p=cygwin-apps/calm.git;a=blob;f=calm/mksetupini.py;h=f24e4c5751e1f7e13516e8689c041403ba1f8d38;hb=HEAD#l118
returns nothing, should return result of do_main().

I'm not familiar with python, so I don't submit a patch, but even
without knowing python it is clearly seen that the errors are not
returned properly.

Br,
Ivan

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mksetupini does not return error code
  2017-11-29 14:58 mksetupini does not return error code Ivan Gagis
@ 2017-11-29 16:56 ` Jon Turney
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2017-11-29 16:56 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Ivan Gagis

On 29/11/2017 14:58, Ivan Gagis wrote:
> Hi,
> 
> I found that in case packages validation fails the mksetup script just
> returns success, though it prints a line in the console saying
> "mksetupini: package set has errors, not writing setup.ini".
> 
> I think it should return some error code so that it would not be
> considered as success by CI scripts where mksetupini is called from.
> 
> The problematic lines are as following:
> 
> https://cygwin.com/git/?p=cygwin-apps/calm.git;a=blob;f=calm/mksetupini.py;h=f24e4c5751e1f7e13516e8689c041403ba1f8d38;hb=HEAD#l63
> returns nothing, should return non-zero error code.
> 
> https://cygwin.com/git/?p=cygwin-apps/calm.git;a=blob;f=calm/mksetupini.py;h=f24e4c5751e1f7e13516e8689c041403ba1f8d38;hb=HEAD#l118
> returns nothing, should return result of do_main().
> 
> I'm not familiar with python, so I don't submit a patch, but even
> without knowing python it is clearly seen that the errors are not
> returned properly.

Yeah, this is a bit of an oversight.  Thanks for pointing it out.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-29 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 14:58 mksetupini does not return error code Ivan Gagis
2017-11-29 16:56 ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).