add flag "-o" to overwrite file on unzipping.
when a build is interrupted by some issues, it will cause a re-substitution problem after a rebuild the target whose source code come from a zip file (like target jzintv)
Don't quote TAR_OPTS or PKG_TAR_COPY_OPTS on purpose as these are (or could be)
lists of options to tar.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
GNU tar can automatically detect the compression format based on
the file name since at least 2006. So just use "tar xf" to extract
all tarballs and drop the redundant cases.
GNU tar can also strip the top level directory from the archive
which allows us to extract it to the directory wanted by the
build system ($PKG_NAME-$PKG_VERSION), so packages don't need to
specify PKG_SOURCE_DIR if the top level dir from that and scripts/unpack
doesn't need to rename the directory.
If PKG_SOURCE_DIR is not set the top level dir is automatically
stripped from the archive and extracted to $BUILD/$PKG_NAME-$PKG_VERSION
If PKG_SOURCE_DIR is set, scripts/extract behaviour is unchanged.
Signed-off-by: Matthias Reichl <hias@horus.com>
Each time scripts/extract is called it sources config/options which is an
expensive operation.
We call scripts/extract 8 times for each possible tarball pattern, and for
7 of those 8 calls scripts/extract does nothing but source config/options
and then exit.
This change is more efficient, while functionally equivalent.
should fix *.zip packages
before pr:
PKG_NAME-PKG_VERSION.zip
creates
build.OE.../PKG_NAME/PKG_NAME-PKG_VERSION/files
instead of
build.OE.../PKG_NAME-PKG_VERSION/files