From a2dd895c665e4aaad87207e7764b30868abe3279 Mon Sep 17 00:00:00 2001 From: "jiankang.fan" Date: Thu, 4 Feb 2016 16:47:10 +0800 Subject: 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 --- init_buildsystem | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'init_buildsystem') 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 -- cgit v1.2.3