Message ID | 1431959088-15257-3-git-send-email-guido@vanguardiasur.com.ar |
---|---|
State | Superseded |
Headers | show |
Dear Guido Martínez,
On Mon, 18 May 2015 11:24:44 -0300, Guido Martínez wrote:
> +ar fp ${DEBFILE} data.tar.xz | ${XZCAT} -d
Are all Debian .deb packages compressed with the xz compression? How
many packages would benefit for this being supported at the package
infra level vs. handling it directly in the toolchain-external package?
We normally try to not clutter the package infra with features only
useful to one package, especially when the feature can easily be
implemented at the package level.
Best regards,
Thomas
On Mon, May 18, 2015 at 09:55:58PM +0200, Thomas Petazzoni wrote: > Dear Guido Martínez, > > On Mon, 18 May 2015 11:24:44 -0300, Guido Martínez wrote: > > > +ar fp ${DEBFILE} data.tar.xz | ${XZCAT} -d > > Are all Debian .deb packages compressed with the xz compression? How > many packages would benefit for this being supported at the package > infra level vs. handling it directly in the toolchain-external package? I had tried with several packages and found they were all XZ-compressed, but I just tried with ~6000 packages and saw that only 90% are XZ-compressed, so this wouldn't work. I also don't know of any packages we might want to use are only shipped the .deb format. > We normally try to not clutter the package infra with features only > useful to one package, especially when the feature can easily be > implemented at the package level. Yeah, I agree. I'll drop this and revert back to custom extract commands.
diff --git a/Makefile b/Makefile index 5c4293b..c20da1f 100644 --- a/Makefile +++ b/Makefile @@ -339,6 +339,8 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \ ZCAT := $(call qstrip,$(BR2_ZCAT)) BZCAT := $(call qstrip,$(BR2_BZCAT)) XZCAT := $(call qstrip,$(BR2_XZCAT)) +export ZCAT BZCAT XZCAT + TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf # packages compiled for the host go here diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 99a3c1e..196dd36 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -77,6 +77,7 @@ INFLATE.tbz = $(BZCAT) INFLATE.tbz2 = $(BZCAT) INFLATE.tgz = $(ZCAT) INFLATE.xz = $(XZCAT) +INFLATE.deb = ./support/extract/inflate-deb.sh INFLATE.tar = cat # suitable-extractor(filename): returns extractor based on suffix suitable-extractor = $(INFLATE$(suffix $(1))) diff --git a/support/extract/inflate-deb.sh b/support/extract/inflate-deb.sh new file mode 100755 index 0000000..39e7b52 --- /dev/null +++ b/support/extract/inflate-deb.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +DEBFILE=$1 + +ar fp ${DEBFILE} data.tar.xz | ${XZCAT} -d
This allows to use packages that are shipped in the .deb format. Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> --- Makefile | 2 ++ package/pkg-utils.mk | 1 + support/extract/inflate-deb.sh | 5 +++++ 3 files changed, 8 insertions(+) create mode 100755 support/extract/inflate-deb.sh