Commit Graph

30 Commits

Author SHA1 Message Date
lihex ec1210eebc force overwrite file on unziping files
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)
2022-09-21 21:06:25 +08:00
Ian Leonard ee99c226bb scripts/extract: less zealous quoting
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>
2021-08-13 01:09:29 +00:00
Ian Leonard 7bbd968108 extract: cleanup
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-08-11 18:16:56 +00:00
Ian Leonard a055e09c3b buildsystem: add .tar.zst handling for package tarballs
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2021-08-11 17:56:42 +00:00
Portisch 641caf3b52 scripts/extract: add option 'PKG_TAR_STRIP_COMPONENTS'
Some archive do not include a top level directory.
2021-05-28 08:33:36 +02:00
MilhouseVH 90be11322a buildsystem: consistently use braces 2019-06-16 03:35:56 +01:00
Ian Leonard eeb3f94648 scripts/extract: convert to die, PKG_BUILD comment
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2018-11-04 05:40:46 +00:00
Matthias Reichl 1c5d050bc0 scripts/extract: improve tar file handling
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>
2018-08-26 22:26:04 +02:00
CvH 843051d0f7 spdx: scripts/ 2018-07-17 23:58:49 +02:00
Matthias Reichl 6d07b46e97 scripts/extract: use tar to copy to correct directory
also add support for custom tar opt, eg to exclude files
or directories when copying

This can be set eg with PKG_TAR_COPY_OPTS="--exclude=.git"
2018-04-02 06:43:04 +01:00
MilhouseVH 1fc3ecc88c scripts/extract: simplify, copy file or dir by default 2018-04-02 06:43:04 +01:00
MilhouseVH e70485eb84 scripts/unpack: avoid calling scripts/extract for each tarball pattern
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.
2017-09-14 10:50:40 +01:00
MilhouseVH 50aac918e6 extract: typos 2017-02-12 22:37:35 +00:00
MilhouseVH 875806cdac Add PKG_SOURCE_NAME for non-standard package tarballs 2016-03-13 23:47:12 -07:00
Stephan Raue 44da7861bc Merge pull request #4543 from CvH/patch-1
zip packages extraction fix
2016-02-07 15:58:53 +01:00
Stephan Raue 6481621d97 scripts: update license headers
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2016-01-02 17:26:58 +01:00
CvH 5f535e8c02 scripts/extract: fix zip extraction
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
2015-12-30 03:50:20 +01:00
Stephan Raue 9a5a8c5917 scripts/unpack: add (initial) support to handle 'zip' archives
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-12-25 23:26:25 +01:00
Stephan Raue 0f3e2d4ffa update license headers
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-12-21 21:51:48 +01:00
Stephan Raue 9ea8fa2b43 scripts: depends now on bash, bye bye dash i dont like you. This should fix #2481
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2013-07-19 02:35:52 +02:00
Domin6 543c89c24b Change copyright and FSF address, this fixes #252 2012-02-29 13:36:32 +01:00
Stephan Raue 1fff11cce9 scripts/extract: add support to extract tar.xz files
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2011-06-20 21:56:18 +02:00
Stephan Raue 87f76ddd29 scripts: cosmetics
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2011-01-09 23:32:01 +01:00
Wintemrute 2d3ad4c2da Adding Headers...... 2011-01-09 22:06:11 +01:00
Stephan Raue d691d2b8f6 buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00