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 v2 2/2] pkg-generic: Cleanup some redundant checks
Date: Tue, 19 Mar 2019 23:03:15 +0100	[thread overview]
Message-ID: <20190319220315.GG2702@scaer> (raw)
In-Reply-To: <20190317212014.3831-2-nolange79@gmail.com>

Norbert, All,

On 2019-03-17 22:20 +0100, Norbert Lange spake thusly:
> With the last change, packages will depend
> only on host-{xz,lzip} if the source archives
> have filenames requesting the corresponding compressor.
> 
> This allows using a single guard.

This commit log is an improvement agaisnt the previous one, yet I still
had to think a bit too hard to understand the reason that works.

And I think there is an issue with that. Not today, but that opens up a
case where we can introduce a subtil bug in the future.

If, say, xz changes its distribution archive from .bz2 to .lz, iand lzip
changes theirs from .gz to .xz, then we'd introduce a circular
dependency at the make level, and make silently and arbitrarily drops
one of the dependencies.

However, now that I think about it, that is of not big consequence: in
either case, the build woulld break on the first one we try to extract,
and we would notice quite early and quite easily.

Still, I'd like we think a bit harder about those special cases.

Regards,
Yann E. MORIN.

> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
>  package/pkg-generic.mk | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 89da43d5e5..11f16cab18 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -604,18 +604,15 @@ endif
>  
>  ifeq ($$(filter host-tar host-skeleton host-fakedate,$(1)),)
>  $(2)_EXTRACT_DEPENDENCIES += $$(BR2_TAR_HOST_DEPENDENCY)
> -endif
>  
> -ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
>  ifneq ($$(filter .xz .lzma,$$(suffix $$($(2)_SOURCE))),)
>  $(2)_EXTRACT_DEPENDENCIES += $$(BR2_XZCAT_HOST_DEPENDENCY)
>  endif
> -endif
>  
> -ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
>  ifeq ($$(suffix $$($(2)_SOURCE)),.lz)
>  $(2)_EXTRACT_DEPENDENCIES += $$(BR2_LZIP_HOST_DEPENDENCY)
>  endif
> +
>  endif
>  
>  ifeq ($$(BR2_CCACHE),y)
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

  reply	other threads:[~2019-03-19 22:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 21:20 [Buildroot] [PATCH v2 1/2] pkg-generic: Depend on host-{xz, lzip} only for fitting archives Norbert Lange
2019-03-17 21:20 ` [Buildroot] [PATCH v2 2/2] pkg-generic: Cleanup some redundant checks Norbert Lange
2019-03-19 22:03   ` Yann E. MORIN [this message]
2019-03-25 21:20     ` Norbert Lange
2019-04-01 21:10   ` Thomas Petazzoni
2019-04-01 21:47   ` Arnout Vandecappelle
2019-03-19 21:50 ` [Buildroot] [PATCH v2 1/2] pkg-generic: Depend on host-{xz, lzip} only for fitting archives Yann E. MORIN
2019-04-01 21:08 ` Thomas Petazzoni
2019-04-05 15:39   ` Peter Korsgaard

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=20190319220315.GG2702@scaer \
    --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