From: jiankang.fan Date: Thu, 4 Feb 2016 08:47:10 +0000 (+0800) Subject: Fix bug for building ubuntu15.04, can't uncompress data.tar.gz. X-Git-Tag: upstream/20160629~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90b22ca8b6bdfd1a4c4746739c55841f8d7b5f9e;p=tools%2Fbuild.git 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 --- 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