Skip to content

Ensure extractor dependencies are taken into account

Yann E. MORIN buildroot 2 versions – New

Get series with b4
b4 am 20191217211948.GB4247@scaer

Versions newest first · linked by author and title

  1. v2 Latest1 of 5 patches 0 repliesNew
  2. v12 of 12 patches 0 repliesSuperseded

1 of 5 patches is in this archive. The cover letter announces 5.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5package/pkg-utils.mk: rename extractor-dependency to extractor-system-dependency+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Buildroot] [PATCH v2 0/5] Ensure extractor dependencies are taken into account

Thomas, All,

On 2019-12-16 16:31 +0100, Thomas Petazzoni spake thusly:

Quoted 4 lines

The starting point for this series is to fix the following build failure:

http://autobuild.buildroot.net/results/83c/83c6d47c06334bef27791a59bdd491b1de124c49/build-end.log

After a slow start yesterday evening, I now applied the rest of the series to master. Thanks!

Regards,
Yann E. MORIN.

Quoted 65 lines

The problem is the following:

- The _SOURCE for gettext-tiny is a .tar.gz

- In addition to this _SOURCE tarball, we also extract the gettext-gnu source code, which is a .tar.xz

- Extracting .tar.xz may require building host-xzcat, is xzcat is not available system-wide

- The build fails because host-xzcat is not added in the dependencies of gettext-tiny. Indeed, while generic-package takes care of adding the extract dependencies needed for _SOURCE, it does not know about other extract dependencies.

This issue appears in
http://autobuild.buildroot.net/results/83c/83c6d47c06334bef27791a59bdd491b1de124c49/build-end.log
because BR2_PER_PACKAGE_DIRECTORIES=y and therefore any missing dependency is immediately visible. But in theory, it could appear without per-package support.

This series solves that by introducing an extractor-pkg-dependency that returns the list of packages that must be added to <pkg>_EXTRACT_DEPENDENCIES to extract the archive passed as argument. It is then used in package/pkg-generic.mk to replace the existing logic to calculate <pkg>_EXTRACT_DEPENDENCIES, and extended to take into account the extractor dependencies needed by _EXTRA_DOWNLOADS instead of just _SOURCE.

We also rename extractor-dependency to extractor-system-dependency to clarify its difference from extractor-pkg-dependency, and we rework the implementation of extractor-system-dependency.

Changes since v1:

- Instead of fixing manually individual packages, directly derive extractor dependencies of EXTRA_DOWNLOADS files inside the generic-package infrastructure. Suggested by Yann. This allowed to greatly removed the number of patches in the series.

- Added Reviewed-by from Romain Naour on patches 1 and 4.

Best regards,

Thomas Petazzoni

Thomas Petazzoni (5):
package/pkg-utils.mk: rename extractor-dependency to
extractor-system-dependency
package/pkg-utils.mk: add extractor-pkg-dependency macro package/pkg-utils.mk: rework implementation of
extractor-system-dependency
package/pkg-generic.mk: use extractor-pkg-dependency macro package/pkg-generic.mk: also apply extractor-pkg-dependency to
<pkg>_EXTRA_DOWNLOADS

 package/pkg-generic.mk                   | 14 ++++----------
 package/pkg-utils.mk                     | 24 ++++++++++++++++++------
 support/dependencies/check-host-lzip.mk  |  1 -
 support/dependencies/check-host-xzcat.mk |  1 -
 4 files changed, 22 insertions(+), 18 deletions(-)
Signature · 1 line
2.23.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'