Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5/5] legal-info: properly error out on missing license file
Date: Sun, 22 Jun 2014 00:35:34 +0200	[thread overview]
Message-ID: <20140621223534.GD21004@free.fr> (raw)
In-Reply-To: <53A206E0.9000506@lucaceresoli.net>

Luca, All,

On 2014-06-18 23:38 +0200, Luca Ceresoli spake thusly:
> Yann E. MORIN wrote:
> >From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >
> >When saving the license files, if a declared license file is missing,
> >print a proper error message, instead of the sometime-criptic error
> >message from 'cp'.
> >
> >Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >Cc: Luca Ceresoli <luca@lucaceresoli.net>
> >Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> >Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> >Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
> >
> >---
> >Note: when I wrote this back in March 2014, I had a concrete example of
> >a criptic error message (the name of the license did not make it obvious
> >we were saving a license file?), but today I can't remember what it was
> >exactly.
> >
> >Since I believe showing a properly-formatted error message to the user
> >is anyway a good thing, I kept that patch. Feel free to ditch it if you
> >don't like it.
> 
> I may be missing something, but I wonder what cryptic error you had
> seen.

Well, now I tried again, that's what I observed:

    $ make legal-info
    [--SNIP--]
    >>> busybox 1.22.1 Extracting
    bzcat /home/ymorin/src/busybox-1.22.1.tar.bz2 | tar --strip-components=1
    -C /home/ymorin/dev/buildroot/O/build/busybox-1.22.1  -xf -
    cat: /home/ymorin/dev/buildroot/O/build/libfslcodec-3.5.7-1.0.0/EULA: No
    such file or directory
    make[1]: *** [libfslcodec-legal-info] Error 1

So, OK, the error is explicitly about fslcodec. But remember that the
line  ">>> busybox 1.22.1 Extracting"  is highlighted, and thus what
stand out is the 'busybox' package, and it took me a while to understand
why on Earth busybox was trying to save an EULA file, when moments later
I saw that it was in fact in the libfslcodec package...

But since this series is expressly about this error case (no-redistribute
packages failed to save the license files), the initial error should be
handled.

I'll redo my tsting here to see if that's still a concern now...

> With your patch applied:
> 
>   ERROR: busybox: license file LICENSE not found
> 
> This is much more concise, but gives a less info about where the
> LICENSE file should be found. To the inexperienced user, the path might
> be a useful hint.
> OTOH, the "ERROR: busybox: " prefix is very informative.
> 
> How about changing your message to:
>   ERROR: busybox: license file LICENSE not found in /.../busybox-1.22.1/
> or
>   ERROR: busybox: license file /.../busybox-1.22.1/LICENSE not found

Yes, we can use the full path to the missing license file, indeed.

Thanks! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2014-06-21 22:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14 15:10 [Buildroot] [PATCH 0/5 v5] legal-info: extract packages to get license files (branch yem/legal) Yann E. MORIN
2014-06-14 15:10 ` [Buildroot] [PATCH 1/5] legal-info: extract even no-redistribute packages Yann E. MORIN
2014-06-18 21:17   ` Luca Ceresoli
2014-06-21 22:08     ` Yann E. MORIN
2014-06-14 15:10 ` [Buildroot] [PATCH 2/5] legal-info: save license files even for local or overriden packages Yann E. MORIN
2014-06-18 21:22   ` Luca Ceresoli
2014-06-14 15:10 ` [Buildroot] [PATCH 3/5] legal-info: add a comment about what packages we save the tarballs of Yann E. MORIN
2014-06-18 21:25   ` Luca Ceresoli
2014-06-14 15:10 ` [Buildroot] [PATCH 4/5] legal-info: rename legal-warning-pkg-savednothing helper Yann E. MORIN
2014-06-18 15:32   ` Luca Ceresoli
2014-06-21 22:17     ` Yann E. MORIN
2014-06-14 15:10 ` [Buildroot] [PATCH 5/5] legal-info: properly error out on missing license file Yann E. MORIN
2014-06-18 21:38   ` Luca Ceresoli
2014-06-21 22:35     ` Yann E. MORIN [this message]
2014-06-15 10:42 ` [Buildroot] [PATCH 0/5 v5] legal-info: extract packages to get license files (branch yem/legal) Yann E. MORIN
2014-06-18 16:00   ` Thomas De Schampheleire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140621223534.GD21004@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox