summaryrefslogtreecommitdiff
path: root/init_buildsystem
diff options
context:
space:
mode:
authorjiankang.fan <jiankang.fan@samsung.com>2016-02-04 16:47:10 +0800
committerjiankang.fan <jiankang.fan@samsung.com>2016-03-15 15:29:06 +0800
commita2dd895c665e4aaad87207e7764b30868abe3279 (patch)
tree55a3f6bac81cecee6bf4a966885a051a3108a9f6 /init_buildsystem
parenta88dbbe1c35f19b1b925c8bfd9a6628cbb306d4f (diff)
downloadbuild-a2dd895c665e4aaad87207e7764b30868abe3279.tar.gz
build-a2dd895c665e4aaad87207e7764b30868abe3279.tar.bz2
build-a2dd895c665e4aaad87207e7764b30868abe3279.zip
Fix bug for building ubuntu15.04, can't uncompress data.tar.gz.
Because there is data.tar.xz in some packages, instead of data.tar.gz Change-Id: I5f3575497c953648e7ffb09946f5c7e4c3f8a6dc Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
Diffstat (limited to 'init_buildsystem')
-rwxr-xr-xinit_buildsystem11
1 files changed, 8 insertions, 3 deletions
diff --git a/init_buildsystem b/init_buildsystem
index e72613a..8907342 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -227,15 +227,20 @@ preinstall()
rm -f .init_b_cache/scripts/.none
fi
elif test -e "$BUILD_ROOT/.init_b_cache/rpms/$1.deb" ; then
- ar x "$BUILD_ROOT/.init_b_cache/rpms/$1.deb" control.tar.gz data.tar.gz
+ # fix issue for ubuntu15.04 "data.tar.xz"
+ ar x "$BUILD_ROOT/.init_b_cache/rpms/$1.deb"
mkdir -p .init_b_cache/scripts/control
$TAR -C .init_b_cache/scripts/control -z -f control.tar.gz
- $TAR -z -f data.tar.gz
+ if test -f "data.tar.gz"; then
+ $TAR -z -f data.tar.gz
+ elif test -f "data.tar.xz"; then
+ $TAR -J -f data.tar.xz
+ fi
if test -e ".init_b_cache/scripts/$1.run" ; then
test -e .init_b_cache/scripts/control/preinst && mv .init_b_cache/scripts/control/preinst ".init_b_cache/scripts/$1.pre"
test -e .init_b_cache/scripts/control/postinst && mv .init_b_cache/scripts/control/postinst ".init_b_cache/scripts/$1.post"
fi
- rm -rf .init_b_cache/scripts/control control.tar.gz data.tar.gz
+ rm -rf .init_b_cache/scripts/control control.tar.gz data.tar.{g,x}z
elif test -e "$BUILD_ROOT/.init_b_cache/rpms/$1.arch" ; then
$TAR -f "$BUILD_ROOT/.init_b_cache/rpms/$1.arch"
if test -f .INSTALL ; then